Question how to create multiple new records from single new page and from same model?

I wish to create new user from new user page but question is that how
can
i create multiple user in one page .I have a single Model user.
I will explain you ,

i have new page for user which have four fields.ok.till now no
problem.But
now i wish to create multiple user at one time.
I have given a "Add " link on new page. by clicking on Add link one more
form should appear.

This is not a case of nested form .

Is is possible to do ?

This is two issues, how to deal with a form that allows you to create
multiple users and how to extend an existing form. Lets deal with the
simplest one first:

Create a form that allows 4 users to be created at once. No
javascript, just write a form that displays the fields to add 4 users.
When you have done that you will know what structure your form should
be and how to process it.

The second issue is how to add new fields to an existing form using
javascript (note we are not creating a new form, just adding new
fields to the existing form). Having written the form that allows 4
users to be added will tell you how the form needs to be structured
and it will make writing the javascript much easier.

I wish to do my work using only one model.In previous example they are
using two model.

Am 26.09.2012 um 12:37 schrieb Fahim P. [email protected]:

try this:

think that is what you are looking for…


You received this message because you are subscribed to the Google G. “Ruby
on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/acctB-TEwgwJ.
For more options, visit https://groups.google.com/groups/opt_out.

Werner L.
[email protected]