Module: LoadAndAuthorizeResource
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/load_and_authorize_resource.rb
Defined Under Namespace
Modules: ClassMethods Classes: AccessDenied, ParameterMissing
Constant Summary collapse
- METHOD_TO_ACTION_NAMES =
Controller method names to action verb mapping
Other controller methods will use the name of the action, e.g. if your controller action is ‘rotate`, then it will be assumed to be your verb too: `current_user.can_rotate?(resource)`
{ 'show' => 'read', 'new' => 'create', 'create' => 'create', 'edit' => 'update', 'update' => 'update', 'destroy' => 'delete' }