Method: ActiveAdmin::ResourceController::DataAccess#apply_authorization_scope
- Defined in:
- lib/active_admin/resource_controller/data_access.rb
#apply_authorization_scope(collection) ⇒ ActiveRecord::Relation (protected)
Gives the authorization library a change to pre-scope the collection.
In the case of the CanCan adapter, it calls #accessible_by on the collection.
198 199 200 201 |
# File 'lib/active_admin/resource_controller/data_access.rb', line 198 def (collection) action_name = (params[:action]) .scope_collection(collection, action_name) end |