# Finding the rhyme for has\_many :through

**URL:** <https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470>\
**Category:** Rails\
**Created:** [May 3, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470 "2006-05-03T19:07:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/1 "2006-05-03T19:07:45Z")

</div>

Hi all,

I am NOT a person with English as my mother language and I haven’t been  
programming long enough to be natural in these kind of things. And if  
that isn’t bad enough, I am a newbie on Rails too… So please  
enligthen.

I am trying to build a simple tool for my shop. I have many products  
that I sell in my shop and of course I have many suppliers for the  
products. Thus to express the relationship between products and  
suppliers, I think I have to create a join model. Beside the product\_id  
and supplier\_id the join model will also note the purchase\_date, the  
quantity, and the price. Am I right till this point? The question is,  
what shall I name the join model? Please remember that I don’t use  
English daily.

I am looking for a word that rhyme. Rails Recipes book gives a very nice  
example. Magazines has many readers through subscriptions. Readers has  
many magazines through subscriptions. It clicks! It rhymes! Now… what  
shall I name my join model?

Thank you,  
John

---

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/2 "2006-05-03T19:08:03Z")

</div>

On 5/3/06, John I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> what shall I name the join model? Please remember that I don’t use  
> English daily.
> 
> I am looking for a word that rhyme. Rails Recipes book gives a very nice  
> example. Magazines has many readers through subscriptions. Readers has  
> many magazines through subscriptions. It clicks! It rhymes! Now… what  
> shall I name my join model?

“Rhyme” probably isn’t what you mean. The “It clicks!” part makes sense  
though.

Personally, given your description, I’d go with “Purchase”. It’s a  
noun and a verb in English. “I purchase food at the store.” “I went  
home from the store with my purchase.”

“Order” is also commonly used in these situations.

– James

---

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/3 "2006-05-03T19:08:05Z")

</div>

On May 3, 2006, at 11:49 AM, James L. wrote:

> “Rhyme” probably isn’t what you mean. The “It clicks!” part makes  
> sense though.
> 
> Personally, given your description, I’d go with “Purchase”. It’s a  
> noun and a verb in English. “I purchase food at the store.” “I went  
> home from the store with my purchase.”
> 
> “Order” is also commonly used in these situations.

I think I’d probably go with Purchase, although I was also thinking  
about “Restocking”, since it could be a bit more descriptive of the  
kind of transaction you are having with your supplier, where a  
Purchase is also something your customers make, from the products you  
have in stock…

-Brian

---

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/4 "2006-05-03T19:08:06Z")

</div>

James L. wrote:

> “Rhyme” probably isn’t what you mean. The “It clicks!” part makes sense  
> though.

Ah… thank you…

> Personally, given your description, I’d go with “Purchase”. It’s a  
> noun and a verb in English. “I purchase food at the store.” “I went  
> home from the store with my purchase.”

A product has many suppliers through purchase. A supplier has many  
products through purchase.

Doesn’t it still sound awkward?

> “Order” is also commonly used in these situations.

Order is probably a better fit. However… I am planning to use order  
for product-order-customer. Maybe I can use purchase\_orders and  
sales\_orders.

> – James

Thanks a bunch James! Really appreciate it.  
John.

---

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/5 "2006-05-03T19:08:11Z")

</div>

On 5/3/06, John I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> A product has many suppliers through purchase. A supplier has many  
> products through purchase.
> 
> Doesn’t it still sound awkward?
> 
> > “Order” is also commonly used in these situations.
> 
> Order is probably a better fit. However… I am planning to use order  
> for product-order-customer. Maybe I can use purchase\_orders and  
> sales\_orders.

What about:  
“A product has many suppliers through fulfillments”  
“A supplier has many products through fulfillments”  
?

---

<div class="post-metadata">

**Author:** ![John\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Post date:** [May 3, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/finding-the-rhyme-for-has-many-through/59470/6 "2006-05-03T19:14:21Z")

</div>

Wilson B. wrote:

> What about:  
> “A product has many suppliers through fulfillments”  
> “A supplier has many products through fulfillments”  
> ?

Thanks! You guys really help a lot.

John
