Forum: Ruby on Rails has_many in a view

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Martin Smith (Guest)
on 2006-03-20 14:54
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
Martin Smith (Guest)
on 2006-03-21 12:34
I found the answer to my own question here...

http://wiki.rubyonrails.org/rails/pages/HowToUpdat...
This topic is locked and can not be replied to.