2012-05-17 23 views
0

HasManyThroughSourceAssociationNotFoundError我有以下代碼的ActiveRecord ::在軌3.0.10

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 

我跑的事項頁面,同時得到了錯誤。

的ActiveRecord :: HasManyThroughSourceAssociationNotFoundError在問題#新

找不到源協會(S):模型參與接觸。嘗試'has_many:原告,:通過=>:涉案,:源=>'。它是其中之一嗎?

而升級的軌道中軌3.0.10 2.3.11項目我有這個錯誤,

它可以在軌2.3.11很好,但我無法理解爲什麼它在軌道3.0.10產生錯誤。

任何一個知道它的解決方案,或者之所以這打破了軌道3.0.10

回答

0

我得到了它的解決方案,其實在我的模型act_as_modified插件使用...

而且,因爲它在rails 3.0.10中不贊同,它給了我錯誤,當我刪除它時,所有關聯工作都很好...

相關問題