Any answer to this? Or is it definitely not possible?
martin
On 5/3/07, Jean-Sébastien
<jeansebastien.ney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> 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 => <name>''. Is it one
> of :issues, :store, :prices, :store_shipping_countries, :guarantees,
:product,
> or :actions?
>
> Can someone help me?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---