>
> > class Recipe < ActiveRecord::Base
> >  has_many :recipe_parts
> >  accepts_nested_attributes_for :recipe_parts
>
> > class RecipePart < ActiveRecord::Base
> >        belongs_to :recipe
> >        has_many :recipe_ingredients
> >        has_many :ingredients, :through => :recipe_ingredients
> >        accepts_nested_attributes_for :recipe
>
> Is that what you meant?  Should it be accepts_nested_attributes_for
> :recipe_ingredients?
>
> Colin
>

Yes it should be  ....for :recipe_ingredients  Thank you.
I guess I haven't got to grips with what accept_nested_attributes_for
was doing, or on which side of the relationship it's supposed to go
since I had it on both sides.

So  - with the first problem solved it took me 30 seconds to solve the
2nd one - finally I don't feel entirely stupid.

Thanks Colin.
Ian

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to