I know that Rails does not support nested has_many: through relationships, although there has been talk and an open ticket about the patch since Rails 2.
I came through a plugin that was pretty smooth, but the main branches do not work with Rails 3, and I hesitate to use this for mission critical tasks in the application, hence the lack of recent active development. So what is the best way to deal with this relationship.
class Author < ActiveRecord::Base has_many :contracts has_many :products, :through => :contracts class Product < ActiveRecord::Base has_many :contracts has_many :orders has_many :authors, :through => :contracts class Contracts < ActiveRecord::Base belongs_to :author belongs_to :product
So, all the creatures, which would be great, could get when ordering, adding this to the authorβs model:
has_many :orders, :through => :products
But alas, you cannot - at least without a plugin. So my question is, what is the best approach to access all copyright orders, when is the only association between the connection model, Contracts?
source share