public
Fork of NZKoz/koz-rails
Description: Koz's rails git-svn clone
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/eventualbuddha/koz-rails.git
Search Repo:
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
rick (author)
Tue Mar 11 00:46:39 -0700 2008
commit  545ca055b3102b94edabe270c8253ccb5310c847
tree    de23c7a7ec9623b557e7955805aa3aff6b183ea5
parent  3d2cd05b61da6339629ee641413cacdd1ffd22fa
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Fix nested parameter hash parsing bug. #10797 [thomas.lee]
0
+
0
 * Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy]
0
 
0
 * Fixed that sweepers defined by cache_sweeper will be added regardless of the perform_caching setting. Instead, control whether the sweeper should be run with the perform_caching setting. This makes testing easier when you want to turn perform_caching on/off [DHH]
...
674
675
676
 
677
678
679
...
674
675
676
677
678
679
680
0
@@ -674,6 +674,7 @@
0
             else
0
               top << {key => value}.with_indifferent_access
0
               push top.last
0
+ value = top[key]
0
             end
0
           else
0
             top << value
...
705
706
707
 
 
 
 
 
 
708
709
710
...
705
706
707
708
709
710
711
712
713
714
715
716
0
@@ -705,6 +705,12 @@
0
     expected = { "test2" => "value1" }
0
     assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input)
0
   end
0
+
0
+ def test_parse_params_with_array_prefix_and_hashes
0
+ input = { "a[][b][c]" => %w(d) }
0
+ expected = {"a" => [{"b" => {"c" => "d"}}]}
0
+ assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input)
0
+ end
0
 end
0
 
0
 

Comments

    No one has commented yet.