Has_many in a view


#1

Is it possible to have one form update the parent (has) and he child
objects (many) in one go. All my best efforts so far have failed for
various reasons.

My models are…

Company:
has_many telephone_numbers

TelephoneNumber:
number

I would then like to be able to edit, add and remove telephone numbers
for the company in the one form, and save everything upon submit.

I have been trying this for a week now wih out any success!

Martin


#2

I found the answer to my own question here…

http://wiki.rubyonrails.org/rails/pages/HowToUpdateModelsWithHasManyRelationships