Class: Ez::Permissions::Roles::IndexCell

Inherits:
ApplicationCell show all
Defined in:
app/cells/ez/permissions/roles/index_cell.rb

Constant Summary

Constants inherited from ApplicationCell

ApplicationCell::BASE_ROUTES, ApplicationCell::CSS_SCOPE, ApplicationCell::I18N_SCOPE

Instance Method Summary collapse

Methods inherited from ApplicationCell

#css_for, #custom_css_map, #div_for, form, #path_for, #t

Instance Method Details

#can_edit?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'app/cells/ez/permissions/roles/index_cell.rb', line 7

def can_edit?
  available_actions.include?(:edit)
end

#can_remove?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/cells/ez/permissions/roles/index_cell.rb', line 11

def can_remove?
  available_actions.include?(:remove)
end


15
16
17
18
19
# File 'app/cells/ez/permissions/roles/index_cell.rb', line 15

def role_permissions_link(role)
  link_to t('roles.actions.permissions'),
          path_for("roles/#{role.id}/permissions"),
          class: css_for('roles-table-permissions-link')
end