Whenever I use regular form for and have an attribute list containing
an array all goes fine and it results in parameters like:
{"some_attributes"=>[{"title"=>"first_title",
"text" => "text1"},
{"title"=>"second_title",
"text"=>"text2"}]}
However whenever I submit the same form with remote_form_for then it
generates the following array:
{"some_attributes"=>[{"title"=>"first_title"},
{"title"=>"second_title"},
{"text"=>"text1"},
{"text"=>"text2"}]}
Anyone know of a way to fix this so the remote_form_for submits the
same parameter list as the regular form_for?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Daniel Hansson
2008-Apr-21 11:05 UTC
Re: Remote form for, Form.serialize and parameter arrays
I have the same problem when using an observe_form, have you come up with any solution on this? Michael wrote:> Whenever I use regular form for and have an attribute list containing > an array all goes fine and it results in parameters like: > > {"some_attributes"=>[{"title"=>"first_title", "text" => "text1"}, > {"title"=>"second_title", "text"=>"text2"}]} > > However whenever I submit the same form with remote_form_for then it > generates the following array: > > {"some_attributes"=>[{"title"=>"first_title"}, > {"title"=>"second_title"}, {"text"=>"text1"}, {"text"=>"text2"}]} > > Anyone know of a way to fix this so the remote_form_for submits the > same parameter list as the regular form_for? > > Thanks.-- 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 -~----------~----~----~----~------~----~------~--~---