From: Brian Candler Date: 2009-06-05T04:45:56+09:00 Subject: Re: Nested HTTP params on ruby HTTP requests Dave Garcia wrote: > On the client side: > > params = {:a=>[{:d=>:e, :b=>:c}]} > serialize_form_data(params) # "a[][d]=e&a[][b]=c" > > On the server side Rails 2.3.2 works fine deserializing my params are : > > {"a"=>[{"b"=>"c", "d"=>"e"}], "action"=>"show", > "controller"=>"identities"} Then I've lost you, because that all seems to be working fine (both serialize_form_data and RoR deserializing it) So can you give an example of what the problem actually is? > But when values are hashes serialization doesn't work as expected. > > For example > { :a => [{:b => :c}, {:d => :e}]} => "a[][b]=c&a[][d]=e" Maybe I misunderstood this. Is this what your code actually produces, or what you expected it to produce? If not, what did you expect it to produce? -- Posted via http://www.ruby-forum.com/.