# Newbie over here

**URL:** <https://www.ruby-forum.com/t/newbie-over-here/185052>\
**Category:** Rails\
**Created:** [March 12, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/newbie-over-here/185052 "2010-03-12T15:41:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![woodsy0130](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/43a26b/32.png) [@woodsy0130](https://www.ruby-forum.com/u/woodsy0130)\
**Post date:** [March 12, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/newbie-over-here/185052/1 "2010-03-12T15:41:44Z")

</div>

How do you specifiy a relationship between a many to many  
decomposition table?

I have been experiementing with has many through etc but i cant seem  
to get it working…

My tables are student and award and the ‘relationship’ table is  
‘certificate’.

Thanks for any responses

Dale

---

<div class="post-metadata">

**Author:** ![woodsy0130](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/43a26b/32.png) [@woodsy0130](https://www.ruby-forum.com/u/woodsy0130)\
**Post date:** [March 12, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/newbie-over-here/185052/2 "2010-03-12T18:05:43Z")

</div>

On 12 March 2010 14:32, woodsy0130 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How do you specifiy a relationship between a many to many  
> decomposition table?
> 
> I have been experiementing with has many through etc but i cant seem  
> to get it working…
> 
> My tables are student and award and the ‘relationship’ table is  
> ‘certificate’.

Have a look at the rails guide on ActiveRecord associations at  
[http://guides.rubyonrails.org/](http://guides.rubyonrails.org/). It has many examples.

Colin

---

<div class="post-metadata">

**Author:** ![woodsy0130](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/43a26b/32.png) [@woodsy0130](https://www.ruby-forum.com/u/woodsy0130)\
**Post date:** [March 13, 2010, 8:30am UTC](https://www.ruby-forum.com/t/newbie-over-here/185052/3 "2010-03-13T08:30:09Z")

</div>

student has many certificate  
certificate has one student

On Fri, Mar 12, 2010 at 10:34 PM, Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Have a look at the rails guide on ActiveRecord associations at  
> .  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
Thanks:  
Rajeev sharma

---

<div class="post-metadata">

**Author:** ![woodsy0130](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/43a26b/32.png) [@woodsy0130](https://www.ruby-forum.com/u/woodsy0130)\
**Post date:** [March 13, 2010, 9:11am UTC](https://www.ruby-forum.com/t/newbie-over-here/185052/4 "2010-03-13T09:11:07Z")

</div>

On 12 March 2010 14:32, woodsy0130 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How do you specifiy a relationship between a many to many  
> decomposition table?
> 
> I have been experiementing with has many through etc but i cant seem  
> to get it working…
> 
> My tables are student and award and the ‘relationship’ table is  
> ‘certificate’.

One of your problems may be that the table names would conventionally  
be plural (students, awards and certificates). Stick to the rails  
conventions and life will be easier.

Colin
