Exception: ActionPolicy::UnknownNamedScope
- Includes:
- SuggestMessage
- Defined in:
- lib/action_policy/policy/scoping.rb
Overview
:nodoc:
Constant Summary collapse
- MESSAGE_TEMPLATE =
"Unknown named scope :%s for type :%s for %s%s"
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(policy_class, type, name) ⇒ UnknownNamedScope
constructor
A new instance of UnknownNamedScope.
Methods included from SuggestMessage
Constructor Details
#initialize(policy_class, type, name) ⇒ UnknownNamedScope
Returns a new instance of UnknownNamedScope.
31 32 33 34 35 36 |
# File 'lib/action_policy/policy/scoping.rb', line 31 def initialize(policy_class, type, name) @message = format( MESSAGE_TEMPLATE, name, type, policy_class, suggest(name, policy_class.scoping_handlers[type].keys) ) end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
29 30 31 |
# File 'lib/action_policy/policy/scoping.rb', line 29 def @message end |