diff options
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 5 | ||||
-rw-r--r-- | actionpack/test/controller/query_string_parsing_test.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 8371f1bf5c..b4ab1ccda1 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -387,6 +387,7 @@ EOM def parameters @parameters ||= request_parameters.merge(query_parameters).update(path_parameters).with_indifferent_access end + alias_method :params, :parameters def path_parameters=(parameters) #:nodoc: @env["rack.routing_args"] = parameters @@ -418,9 +419,11 @@ EOM end alias_method :query_parameters, :GET - def request_parameters + # Override Rack's POST method to support nested query strings + def POST @parser.request_parameters end + alias_method :request_parameters, :POST def body_stream #:nodoc: @env['rack.input'] diff --git a/actionpack/test/controller/query_string_parsing_test.rb b/actionpack/test/controller/query_string_parsing_test.rb index 91f5b2b27a..a31e326ddf 100644 --- a/actionpack/test/controller/query_string_parsing_test.rb +++ b/actionpack/test/controller/query_string_parsing_test.rb @@ -1,4 +1,6 @@ -class QueryStringParsingTest <ActionController::IntegrationTest +require 'abstract_unit' + +class QueryStringParsingTest < ActionController::IntegrationTest class TestController < ActionController::Base class << self attr_accessor :last_query_parameters |