# Multi level has\_many through

**URL:** <https://www.ruby-forum.com/t/multi-level-has-many-through/103285>\
**Category:** Rails\
**Created:** [May 3, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/multi-level-has-many-through/103285 "2007-05-03T20:23:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jney](https://www.ruby-forum.com/u/jney)\
**Post date:** [May 3, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/multi-level-has-many-through/103285/1 "2007-05-03T20:23:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@jney](https://www.ruby-forum.com/u/jney)\
**Post date:** [June 11, 2007, 2:39pm UTC](https://www.ruby-forum.com/t/multi-level-has-many-through/103285/2 "2007-06-11T14:39:55Z")

</div>

Any answer to this? Or is it definitely not possible?

martin
