Method: ActiveRecord::InverseOfAssociationRecursiveError#initialize

Defined in:
lib/active_record/associations.rb

#initialize(reflection = nil) ⇒ InverseOfAssociationRecursiveError

Returns a new instance of InverseOfAssociationRecursiveError.



64
65
66
67
68
69
70
71
# File '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