I have the following code
class Involvement < ActiveRecord::Base
belongs_to :matter
belongs_to :contact
end
class Contact < ActiveRecord::Base
has_many :involvements, :order => "position", :dependent => :destroy
has_many :matters, :through => :involvements, :source => :matter
end
class Matter < ActiveRecord::Base
has_many :involvements
has_many :plaintiffs, :through => :involvements, :source => :contact
has_many :defendants, :through => :involvements, :source => :contact
end
I got the error while running the matters page.
ActiveRecord::HasManyThroughSourceAssociationNotFoundError in Matters#new
Could not find the source association(s) :contact in model Involvement. Try 'has_many :plaintiffs, :through => :involvements, :source => '. Is it one of ?
I have got this error while upgrade the rails 2.3.11 project in rails 3.0.10,
It works fine in rails 2.3.11 but I am unable to understand why it produces error in rails 3.0.10.
Any one know the solution of it, or reason why this breaks in rails 3.0.10