Changeset 4823
- Timestamp:
- 08/26/06 03:09:32 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r4822 r4823 208 208 top[-1][key] = value 209 209 else 210 top << {key => value} 210 top << {key => value}.with_indifferent_access 211 211 push top.last 212 212 end trunk/actionpack/test/controller/cgi_test.rb
r4822 r4823 44 44 def test_deep_query_string_with_array_of_hashes_with_one_pair 45 45 assert_equal({'x' => {'y' => [{'z' => '10'}, {'z' => '20'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20')) 46 assert_equal("10", CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20')["x"]["y"].first["z"]) 47 assert_equal("10", CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][z]=20').with_indifferent_access[:x][:y].first[:z]) 46 48 end 47 49