Exception: Granite::Action::NotAllowedError
- Defined in:
- lib/granite/action/policies.rb
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(action) ⇒ NotAllowedError
constructor
A new instance of NotAllowedError.
Constructor Details
#initialize(action) ⇒ NotAllowedError
Returns a new instance of NotAllowedError.
9 10 11 12 13 14 |
# File 'lib/granite/action/policies.rb', line 9 def initialize(action) performer_id = "##{action.performer.id}" if action.performer.respond_to?(:id) && action.performer.id.present? super("#{action.class} action is not allowed " \ "for #{action.performer.class}#{performer_id}", action) end |