From 1e0ac3a673a6cc92c1c6c5bc84180afeb60241d9 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 13 Mar 2008 03:22:25 +0000 Subject: Fix more obscure nested parameter hash parsing bug. Closes #10797 [thomas.lee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/request_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/controller/request_test.rb') diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index bae4d6ffe4..a12b929477 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -711,6 +711,12 @@ class UrlEncodedRequestParameterParsingTest < Test::Unit::TestCase expected = {"a" => [{"b" => {"c" => "d"}}]} assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input) end + + def test_parse_params_with_complex_nesting + input = { "a[][b][c][][d][]" => %w(e) } + expected = {"a" => [{"b" => {"c" => [{"d" => ["e"]}]}}]} + assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input) + end end -- cgit v1.2.3