aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2013-01-10 22:53:44 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2013-01-10 22:53:44 -0800
commit3211eb17b999523d19d7e5e4431e0f1ac25a740f (patch)
treed100fa9b22d47dcf58212f56c4f98e5226d37005 /actionpack/lib
parentd564ee06a8430df809397a64e2d5f9d797be7106 (diff)
parent7003b36ecfe6f04a87e913828ab0f8dde4e03ecb (diff)
downloadrails-3211eb17b999523d19d7e5e4431e0f1ac25a740f.tar.gz
rails-3211eb17b999523d19d7e5e4431e0f1ac25a740f.tar.bz2
rails-3211eb17b999523d19d7e5e4431e0f1ac25a740f.zip
Merge pull request #8888 from dylanahsmith/3-2-parse-non-object-json-params
3-2-stable: Fix JSON params parsing regression for non-object JSON content.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/params_parser.rb4
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 ac726895fa..0e03d85d9a 100644
--- a/actionpack/lib/action_dispatch/middleware/params_parser.rb
+++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -44,10 +44,10 @@ module ActionDispatch
when :yaml
YAML.load(request.raw_post)
when :json
- data = request.deep_munge ActiveSupport::JSON.decode(request.body)
+ data = ActiveSupport::JSON.decode(request.body)
request.body.rewind if request.body.respond_to?(:rewind)
data = {:_json => data} unless data.is_a?(Hash)
- data.with_indifferent_access
+ request.deep_munge(data).with_indifferent_access
else
false
end