Exception: AssociationScope::PolymorphicAssociationError
- Inherits:
-
StandardError
- Object
- StandardError
- AssociationScope::PolymorphicAssociationError
- Defined in:
- lib/association_scope/errors/polymorphic_association_error.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
Returns the value of attribute association.
-
#model ⇒ Object
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(association: nil, model: nil) ⇒ PolymorphicAssociationError
constructor
A new instance of PolymorphicAssociationError.
- #message ⇒ Object
Constructor Details
#initialize(association: nil, model: nil) ⇒ PolymorphicAssociationError
Returns a new instance of PolymorphicAssociationError.
8 9 10 11 |
# File 'lib/association_scope/errors/polymorphic_association_error.rb', line 8 def initialize(association: nil, model: nil) @association = association @model = model end |
Instance Attribute Details
#association ⇒ Object
Returns the value of attribute association.
5 6 7 |
# File 'lib/association_scope/errors/polymorphic_association_error.rb', line 5 def association @association end |
#model ⇒ Object
Returns the value of attribute model.
5 6 7 |
# File 'lib/association_scope/errors/polymorphic_association_error.rb', line 5 def model @model end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/association_scope/errors/polymorphic_association_error.rb', line 13 def "Association :#{association} is polymorph in #{model}!" end |