hello,
how can i use has_many through for class further then 2 levels
i have 4 classes :
Product
StoreEntry
Store
StoreShippingCountry
and i try to access StoreShippingCountry from Product
what i do :
class Product < ActiveRecord::Base
has_many :store_entries
has_many :stores,
:through => :store_entries
has_many :store_shipping_countries,
:through => :store_entries,
:source => :stores
end
and here is the error i recieve :
Could not find the source association(s) :stores in model StoreEntry.
Try 'has_many :store_shipping_countries, :through
=> :store_entries, :source => '. Is it one
of :issues, :store, :prices, :store_shipping_countries, :guarantees,
:product,
or :actions?
Can someone help me?