I want to make a single form, but it will potentially create 3 new models. There are relationships between these models (belongs_to). I have also generated the sections with scaffolding and created form partials. For example, I have a form for a Project (1). This project references a Manager (2) and Team (3). In this form, I would like for a user to be able to submit a project and either enter this information as new or lookup the info (autocompleter I can handle). On the "back-end" I would need to be able to save any new Manager and Team data and create the necessary relationships... So my question is, what is the best way to leverage RoR to display and save these forms?? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The Handle Multiple Models in One Form<http://media.pragprog.com/titles/fr_arr/multiple_models_one_form.pdf>extract from Advanced Rails Recipes <http://pragprog.com/titles/fr_arr/advanced-rails-recipes> is quite good. Regards, Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I think the complex forms series with Ryan Bates talks about this as well. Ramon Tayag On Wed, Oct 1, 2008 at 6:49 AM, Jason <mccreary.jason-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I want to make a single form, but it will potentially create 3 new > models. There are relationships between these models (belongs_to). I > have also generated the sections with scaffolding and created form > partials. > > For example, I have a form for a Project (1). This project references > a Manager (2) and Team (3). In this form, I would like for a user to > be able to submit a project and either enter this information as new > or lookup the info (autocompleter I can handle). On the "back-end" I > would need to be able to save any new Manager and Team data and create > the necessary relationships... > > So my question is, what is the best way to leverage RoR to display and > save these forms?? > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the quick response! On Sep 30, 9:05 pm, "Ramon Miguel M. Tayag" <ramon.ta...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think the complex forms series with Ryan Bates talks about this as well. > > Ramon Tayag > > On Wed, Oct 1, 2008 at 6:49 AM, Jason <mccreary.ja...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I want to make a single form, but it will potentially create 3 new > > models. There are relationships between these models (belongs_to). I > > have also generated the sections with scaffolding and created form > > partials. > > > For example, I have a form for a Project (1). This project references > > a Manager (2) and Team (3). In this form, I would like for a user to > > be able to submit a project and either enter this information as new > > or lookup the info (autocompleter I can handle). On the "back-end" I > > would need to be able to save any new Manager and Team data and create > > the necessary relationships... > > > So my question is, what is the best way to leverage RoR to display and > > save these forms??--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---