search for: department_products

Displaying 1 result from an estimated 1 matches for "department_products".

2010 Aug 02
7
Complex associations
...cts for that StoreType. Currently, I have set up the following associtations on StoreType: class StoreType < ActiveRecord::Base has_many :stores has_many :departments, :through=>:stores has_many :store_products, :through=>:stores, :source=>:products, :uniq => true has_many :department_products, :through=>:departments, :source=>:products, :uniq => true end This is using the Nested Has Many Through plugin to achieve the nested association (department_products). However, I''d like to have a generic ''products'' association for StoreType that pulls a combin...