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.

try this:

http://railscasts.com/episodes/75-complex-forms-part-3

think that is what you are looking for…

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 ?

You received this message because you are subscribed to the Google Groups “Ruby on Rails: Talk” group.

To post to this group, send email to rubyonrails-talk@googlegroups.com.

To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.

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 Laude

webagentur.laude@gmail.com

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