Module: CanCanDry::ControllerAuthorization

Extended by:
ActiveSupport::Concern
Defined in:
lib/can_can_dry/controller_authorization.rb

Instance Method Summary collapse

Instance Method Details

#authorize_by_ability_mappingObject

Raises:

  • (CanCan::AccessDenied)


11
12
13
14
# File 'lib/can_can_dry/controller_authorization.rb', line 11

def authorize_by_ability_mapping
  raise CanCan::AccessDenied, "Falhou ao tentar acessar #{path_hash}" unless
    can_by_path_hash?(path_hash)
end