Exception: ActiveRecord::InverseOfAssociationNotFoundError

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(reflection = nil, associated_class = nil) ⇒ InverseOfAssociationNotFoundError

Returns a new instance of InverseOfAssociationNotFoundError.



20
21
22
23
24
25
26
# File 'lib/active_record/associations.rb', line 20

def initialize(reflection = nil, associated_class = nil)
  if reflection
    super("Could not find the inverse association for #{reflection.name} (#{reflection.options[:inverse_of].inspect} in #{associated_class.nil? ? reflection.class_name : associated_class.name})")
  else
    super("Could not find the inverse association.")
  end
end