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