Hi All, Quick question: I''ve read a lot about creating building multiple child items to the parent in one form, but what is the best way to create multiple instances of a model in one form, eg: creating up to 10 projects in one form. Best -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
neharohan.chopra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Feb-11 22:05 UTC
Re: Best way to create multiple projects in one form?
Why not create an array of model objects and instantiate it using a for loop. On Feb 11, 2:50 pm, Robert Malko <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi All, > > Quick question: I''ve read a lot about creating building multiple child > items to the parent in one form, but what is the best way to create > multiple instances of a model in one form, eg: creating up to 10 > projects in one form. > > Best > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Neha Chopra wrote:> Why not create an array of model objects and instantiate it using a > for loop. > > On Feb 11, 2:50 pm, Robert Malko <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>I have done a for loop in the create action but can''t figure out how to use error checking as I''m getting a lot of double rendering errors. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
neharohan.chopra-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Feb-12 17:24 UTC
Re: Best way to create multiple projects in one form?
You cant render at multiple places. If you have to render different partials then put them in a block but dont call render :update again and again/. Rather user render :update do |page| <%all ur renders here%> end On Feb 11, 5:33 pm, Robert Malko <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Neha Chopra wrote: > > Why not create an array of model objects and instantiate it using a > > for loop. > > > On Feb 11, 2:50 pm, Robert Malko <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > I have done a for loop in the create action but can''t figure out how to > use error checking as I''m getting a lot of double rendering errors. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---