Exception: ActiveRecord::InverseOfAssociationRecursiveError

Inherits:
ActiveRecordError show all
Defined in:
activerecord/lib/active_record/associations.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reflection = nil) ⇒ InverseOfAssociationRecursiveError

Returns a new instance of InverseOfAssociationRecursiveError.


64
65
66
67
68
69
70
71
# File 'activerecord/lib/active_record/associations.rb', line 64

def initialize(reflection = nil)
  if reflection
    @reflection = reflection
    super("Inverse association #{reflection.name} (#{reflection.options[:inverse_of].inspect} in #{reflection.class_name}) is recursive.")
  else
    super("Inverse association is recursive.")
  end
end

Instance Attribute Details

#reflectionObject (readonly)

Returns the value of attribute reflection.


63
64
65
# File 'activerecord/lib/active_record/associations.rb', line 63

def reflection
  @reflection
end