search for: store_products

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

2010 Aug 02
7
Complex associations
...39;d like to do is have an association in the StoreType model that would give me all products 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 li...