Forum: Ruby on Rails Form for Multiple Models

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C09a7adfa900a4b49939e65dd64f2a2a?d=identicon&s=25 Nathan P. Verni (Guest)
on 2006-05-26 18:59
(Received via mailing list)
I have a signup form that needs to do these three things:

1)       create a new "Group"

2)       create a new "User"

3)       Add that User to the Group

I have the scaffolding for the create new user form:

<% form_for :user do |form| %>


        <label for="user_name">First Name:</label>

        <%= form.text_field :first_name, :size => 40 %>


      # ...

<% end %>

I want to add a "Group Name" field to this same form so that the
controller can use it to create a new Group in the database and then do
the typical, etc...
This topic is locked and can not be replied to.