Fahim Patel
2012-Sep-26 10:37 UTC
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 ? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Peter Hickman
2012-Sep-26 11:32 UTC
Re: Question . how to create multiple new records from single new page and from same model?
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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Werner Laude
2012-Sep-26 14:18 UTC
Re: Question . how to create multiple new records from single new page and from same model?
Am 26.09.2012 um 12:37 schrieb Fahim Patel <pafahim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Fahim Patel
2012-Sep-26 14:22 UTC
Re: Question . how to create multiple new records from single new page and from same model?
I wish to do my work using only one model.In previous example they are using two model. On Wednesday, September 26, 2012 4:07:32 PM UTC+5:30, Fahim Patel wrote:> > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uy0EdELWNYMJ. For more options, visit https://groups.google.com/groups/opt_out.