Has_many in a view

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

I found the answer to my own question here…

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs