Ticket #10797: 10797-003.patch
| File 10797-003.patch, 1.2 kB (added by thomas.lee, 6 months ago) |
|---|
-
a/actionpack/lib/action_controller/request.rb
old new 674 674 else 675 675 top << {key => value}.with_indifferent_access 676 676 push top.last 677 value = top[key] 677 678 end 678 679 else 679 680 top << value -
a/actionpack/test/controller/request_test.rb
old new 705 705 expected = { "test2" => "value1" } 706 706 assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input) 707 707 end 708 709 def test_parse_params_with_array_prefix_and_hashes 710 input = { "a[][b][c]" => %w(d) } 711 expected = {"a" => [{"b" => {"c" => "d"}}]} 712 assert_equal expected, ActionController::AbstractRequest.parse_request_parameters(input) 713 end 708 714 end 709 715 710 716