2012-10-31 71 views

回答

1

的帳戶的關係需要修復,像這樣:

item.rb的:

belongs_to :expense_account, class_name: "Account" 
belongs_to :income_account, class_name: "Account" 

account.rb:

has_many :items, inverse_of: :expense_account 
has_many :items, inverse_of: :income_account