aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/request_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2008-03-11 07:46:39 +0000
committerRick Olson <technoweenie@gmail.com>2008-03-11 07:46:39 +0000
commit3a17ea9031c32bf3b5817c74bba777ec06c5eb41 (patch)
treede23c7a7ec9623b557e7955805aa3aff6b183ea5 /actionpack/test/controller/request_test.rb
parent5483de0cc345772eb22a461c4509a0bd072863a9 (diff)
downloadrails-3a17ea9031c32bf3b5817c74bba777ec06c5eb41.tar.gz
rails-3a17ea9031c32bf3b5817c74bba777ec06c5eb41.tar.bz2
rails-3a17ea9031c32bf3b5817c74bba777ec06c5eb41.zip
Fix nested parameter hash parsing bug. #10797 [thomas.lee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/request_test.rb')
-rw-r--r--actionpack/test/controller/request_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb
index 68d6afb426..bae4d6ffe4 100644
--- a/actionpack/test/controller/request_test.rb
+++ b/actionpack/test/controller/request_test.rb
@@ -705,6 +705,12 @@ class UrlEncodedRequestParameterParsingTest < Test::Unit::TestCase
expected = { "test2" => "value1" }
assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input)
end
+
+ def test_parse_params_with_array_prefix_and_hashes
+ input = { "a[][b][c]" => %w(d) }
+ expected = {"a" => [{"b" => {"c" => "d"}}]}
+ assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input)
+ end
end