I have a report with multiple --~--~---------~--~----~------------~-------~--~----~ 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 have a report with many rows some of which refer to an existing ActiveRecord model object and some new ones. I''m trying to figure out a naming convention for the form elements so that Rails will properly convert it into a params hash in my controller. My first idea is to do something like the below but Rails will confuse the data for the two ''new'' rows Enter a new invitation <input name=invite[][first_name]> <input name=invite[][last_name]> <br/> Enter a new invitation <input name=invite[][first_name]> <input name=invite[][last_name]> <br/> Update an existing invitation <input name=invite[1][first_name]> <input name=invite[1][last_name]> <br/> My second idea is to do something like the below and parse out the ''new_'' params in my controller Enter a new invitation <input name=invite[new_1][first_name]> <input name=invite[][last_name]> <br/> Enter a new invitation <input name=invite[new_2][first_name]> <input name=invite[][last_name]> <br/> Update an existing invitation <input name=invite[1][first_name]> <input name=invite[1][last_name]> <br/> Is this a common problem that others have solved in a standard way before? Any pointers to plugins or techniques others have used? Thanks Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---