Exception: ActionPolicy::NotFound
- Defined in:
- lib/action_policy.rb
Overview
Raised when Action Policy fails to find a policy class for a record.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target) ⇒ NotFound
constructor
A new instance of NotFound.
Constructor Details
#initialize(target) ⇒ NotFound
Returns a new instance of NotFound.
14 15 16 17 |
# File 'lib/action_policy.rb', line 14 def initialize(target) @target = target @message = "Couldn't find policy class for #{target.inspect}" end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
12 13 14 |
# File 'lib/action_policy.rb', line 12 def @message end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
12 13 14 |
# File 'lib/action_policy.rb', line 12 def target @target end |