Doug Livesey
2009-Dec-21 17:35 UTC
post method or request flattening array of hashes in params
Hi -- I have the following code in a cucumber feature: http://pastie.org/752061 The problem is that the post method (or the controller) is flattening the array of hashes into an array containing all the key-value pairs in one hash, like so: http://pastie.org/752067 (Obtained from a call to inspect on params[:upload_data] in the controller.) I also call the post action from a controller spec with this code, which is basically identical: http://pastie.org/752070 This treats the params correctly, and the inspection from this is: http://pastie.org/752079 This is very weird! I''m using the latest stable version of Rails, and Ruby 1.9.1 Can anyone shed any light on what may be going wrong, here? Thanks, Doug. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.