Re: [Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Colin Law
On 18 October 2011 13:09, Michael Pavling wrote: > > On 18 Oct 2011 12:56, "Chris" wrote: >> >> There are some Meals and each meal has many sides. >> >> But it's only this single direction - so a side don't need to belong >> to the meal. I don't wanna search: "Give me the meals where side >> is .

Re: [Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Michael Pavling
On 18 Oct 2011 12:56, "Chris" wrote: > > There are some Meals and each meal has many sides. > > But it's only this single direction - so a side don't need to belong > to the meal. I don't wanna search: "Give me the meals where side > is ..." > > So one Side could be associated with many meals. > >

[Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Chris
Hi There, I got stuck in a Problem with Active Record Associations. There are some Meals and each meal has many sides. But it's only this single direction - so a side don't need to belong to the meal. I don't wanna search: "Give me the meals where side is ..." I'll show you the problem with an