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
I’ll show you the problem with an example:
So one Side could be associated with many meals.
But I’m not shure how to create this with active Record.
I thought it should be enough to do this:
class Meal < ActiveRecord::Base
class Side < ActiveRecord::Base
But the meal_id is saved at the Side - so a side will only belong to
the last associated Meal - am I right?
Thanks allot for your help