Exception: Authz::Scopables::Base::NoAssociationFound
- Inherits:
-
StandardError
- Object
- StandardError
- Authz::Scopables::Base::NoAssociationFound
- Defined in:
- lib/authz/scopables/base.rb
Overview
Error that will be raised if the model being scoped doesn’t appear to have an association to the scoping class.
Instance Attribute Summary collapse
- #scopable ⇒ Object readonly
- #scoped_class ⇒ Object readonly
- #scoping_class ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NoAssociationFound
constructor
A new instance of NoAssociationFound.
Constructor Details
#initialize(options = {}) ⇒ NoAssociationFound
Returns a new instance of NoAssociationFound.
95 96 97 98 99 100 101 102 |
# File 'lib/authz/scopables/base.rb', line 95 def initialize( = {}) @scoped_class = .fetch(:scoped_class) @scopable = .fetch :scopable scoping_class = .fetch :scoping_class = "#{scoped_class} is not associated with " \ "#{scoping_class} for #{scopable}. " super() end |
Instance Attribute Details
#scopable ⇒ Object (readonly)
93 94 95 |
# File 'lib/authz/scopables/base.rb', line 93 def scopable @scopable end |
#scoped_class ⇒ Object (readonly)
93 94 95 |
# File 'lib/authz/scopables/base.rb', line 93 def scoped_class @scoped_class end |
#scoping_class ⇒ Object (readonly)
93 94 95 |
# File 'lib/authz/scopables/base.rb', line 93 def scoping_class @scoping_class end |