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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 March 2010 14:32, woodsy0130 <woodsy0130-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 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/. It has many examples. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
student has many certificate certificate has one student On Fri, Mar 12, 2010 at 10:34 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 12 March 2010 14:32, woodsy0130 <woodsy0130-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 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/. It has many examples. > > Colin > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Thanks: Rajeev sharma -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 March 2010 14:32, woodsy0130 <woodsy0130-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> 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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.