diff options
author | Dylan Smith <Dylan.Smith@shopify.com> | 2013-01-09 15:26:12 -0500 |
---|---|---|
committer | Dylan Smith <Dylan.Smith@shopify.com> | 2013-01-11 00:28:32 -0500 |
commit | bae92681be97191edda90990e08b5275d187107f (patch) | |
tree | 71445260ff346809533fa27a993995f3f2b6ffd1 /actionpack/lib | |
parent | 8a7fad8970aadea3a79657ef09d3247786e27c2e (diff) | |
download | rails-bae92681be97191edda90990e08b5275d187107f.tar.gz rails-bae92681be97191edda90990e08b5275d187107f.tar.bz2 rails-bae92681be97191edda90990e08b5275d187107f.zip |
Fix json params parsing regression for non-object JSON content.
Fixes #8845.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/params_parser.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb index a3291bb7ad..0898ad82dd 100644 --- a/actionpack/lib/action_dispatch/middleware/params_parser.rb +++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb @@ -50,9 +50,9 @@ module ActionDispatch data = request.deep_munge(Hash.from_xml(request.body.read) || {}) data.with_indifferent_access when :json - data = request.deep_munge ActiveSupport::JSON.decode(request.body) + data = ActiveSupport::JSON.decode(request.body) data = {:_json => data} unless data.is_a?(Hash) - data.with_indifferent_access + request.deep_munge(data).with_indifferent_access else false end |