# Naming join models for has\_many :through

**URL:** <https://www.ruby-forum.com/t/naming-join-models-for-has-many-through/117189>\
**Category:** Rails\
**Created:** [October 14, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/naming-join-models-for-has-many-through/117189 "2007-10-14T15:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeoligny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/839c29/32.png) [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Post date:** [October 14, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/naming-join-models-for-has-many-through/117189/1 "2007-10-14T15:51:36Z")

</div>

Hi,

I’m having trouble naming my join models. The tables in question are:

- stores (list of company branches / stocking locations)
- items (inventory items)
- items\_stores (item xyz is stocked by store\_id 7, their re-order  
point is 10, their sales price $27.50)
- items\_locations (store\_id 7 keeps part xyz on shelf B252)

While I believe items\_stores would be proper naming for a HABTM type  
relationship, everything I’ve found says to make up a new name for  
has\_many :through join models.

I’d be willing to change any of these names if someone can suggest an  
elegant solution.

Another issue I am confused about is the items\_locations table. The  
main reason I want this is to allow one store to keep a product in  
multiple locations. Technically the locations information would be  
associated with items\_stores, but I don’t think items\_stores\_locations  
is a good name either. 🙂

Any suggestions would be really appreciated - I’ve been coming back to  
this problem for a long time now without any real progress.

Thanks,  
-Mike
