3 Comments
Let me expose the problem with an example :
Cart model (as in : shopping cart)
Bill model
User
Basically, because the “through” table links the destination table with a has_one relationship, ActiveRecord complains with : Invalid source reflection macro :has_one for has_many :bills, :through => :carts. Use :source to specify the source reflection.
Someone on Rails Trac already created a ticket about this issue 2 years ago. Can we expect this feature to be officially supported in the future? Let’s hope so.
Rate this post :
3 Comments
