Exception: ActiveRecord::InverseOfAssociationRecursiveError
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::InverseOfAssociationRecursiveError
- Defined in:
- lib/active_record/associations/errors.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
-
#initialize(reflection = nil) ⇒ InverseOfAssociationRecursiveError
constructor
A new instance of InverseOfAssociationRecursiveError.
Constructor Details
#initialize(reflection = nil) ⇒ InverseOfAssociationRecursiveError
Returns a new instance of InverseOfAssociationRecursiveError.
64 65 66 67 68 69 70 71 |
# File 'lib/active_record/associations/errors.rb', line 64 def initialize(reflection = nil) if reflection @reflection = reflection super("Inverse association #{reflection.name} (#{reflection.[:inverse_of].inspect} in #{reflection.class_name}) is recursive.") else super("Inverse association is recursive.") end end |
Instance Attribute Details
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
63 64 65 |
# File 'lib/active_record/associations/errors.rb', line 63 def reflection @reflection end |