diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-05 14:52:49 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-05 14:52:49 -0800 |
commit | 4d073df43d6ecd99ab04dbd0773a61559325efb8 (patch) | |
tree | 30afafb70e5ab62f34449d1c9d2d6aeb38adcafb /actionpack/lib | |
parent | f53c247d10acbaacb0d61824cfce888c4b0520d2 (diff) | |
download | rails-4d073df43d6ecd99ab04dbd0773a61559325efb8.tar.gz rails-4d073df43d6ecd99ab04dbd0773a61559325efb8.tar.bz2 rails-4d073df43d6ecd99ab04dbd0773a61559325efb8.zip |
Revert "remove deprecated API"
This reverts commit f53c247d10acbaacb0d61824cfce888c4b0520d2.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 3cdba85699..e96ff82a5a 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -431,6 +431,7 @@ module ActionController def process(action, http_method = 'GET', *args) check_required_ivars + http_method, args = handle_old_process_api(http_method, args) if args.first.is_a?(String) @request.env['RAW_POST_DATA'] = args.shift @@ -512,6 +513,17 @@ module ActionController end end + def handle_old_process_api(http_method, args) + # 4.0: Remove this method. + if http_method.is_a?(Hash) + ActiveSupport::Deprecation.warn("TestCase#process now expects the HTTP method as second argument: process(action, http_method, params, session, flash)") + args.unshift(http_method) + http_method = args.last.is_a?(String) ? args.last : "GET" + end + + [http_method, args] + end + def build_request_uri(action, parameters) unless @request.env["PATH_INFO"] options = @controller.respond_to?(:url_options) ? @controller.__send__(:url_options).merge(parameters) : parameters |