Exception: ActiveRecord::HasManyThroughAssociationNotFoundError
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::HasManyThroughAssociationNotFoundError
- Defined in:
- lib/active_record/associations.rb
Overview
:nodoc:
Defined Under Namespace
Classes: Correction
Instance Attribute Summary collapse
-
#owner_class ⇒ Object
readonly
Returns the value of attribute owner_class.
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
-
#initialize(owner_class = nil, reflection = nil) ⇒ HasManyThroughAssociationNotFoundError
constructor
A new instance of HasManyThroughAssociationNotFoundError.
Constructor Details
#initialize(owner_class = nil, reflection = nil) ⇒ HasManyThroughAssociationNotFoundError
Returns a new instance of HasManyThroughAssociationNotFoundError.
82 83 84 85 86 87 88 89 90 |
# File 'lib/active_record/associations.rb', line 82 def initialize(owner_class = nil, reflection = nil) if owner_class && reflection @owner_class = owner_class @reflection = reflection super("Could not find the association #{reflection.[:through].inspect} in model #{owner_class.name}") else super("Could not find the association.") end end |
Instance Attribute Details
#owner_class ⇒ Object (readonly)
Returns the value of attribute owner_class.
80 81 82 |
# File 'lib/active_record/associations.rb', line 80 def owner_class @owner_class end |
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
80 81 82 |
# File 'lib/active_record/associations.rb', line 80 def reflection @reflection end |