diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:29:18 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:29:18 -0500 |
commit | f32cf44870549c6cc5b6e6c84cffc1facf6ec38e (patch) | |
tree | 320e7398d1e6e4f3f372cd2ee90d1e2560459f10 /actionpack/lib/action_controller/base/base.rb | |
parent | a8b75c480fc9774252f5976dcf1a614079822e56 (diff) | |
download | rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.tar.gz rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.tar.bz2 rails-f32cf44870549c6cc5b6e6c84cffc1facf6ec38e.zip |
Switch functional tests to run through the rack interface instead of process
Diffstat (limited to 'actionpack/lib/action_controller/base/base.rb')
-rw-r--r-- | actionpack/lib/action_controller/base/base.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/base/base.rb b/actionpack/lib/action_controller/base/base.rb index ef97986c0e..eb65f59ddd 100644 --- a/actionpack/lib/action_controller/base/base.rb +++ b/actionpack/lib/action_controller/base/base.rb @@ -371,10 +371,7 @@ module ActionController #:nodoc: class << self def call(env) - # HACK: For global rescue to have access to the original request and response - request = env["action_controller.rescue.request"] ||= ActionDispatch::Request.new(env) - response = env["action_controller.rescue.response"] ||= ActionDispatch::Response.new - process(request, response) + new.call(env) end # Factory for the standard create, process loop where the controller is discarded after processing. @@ -511,6 +508,13 @@ module ActionController #:nodoc: end public + def call(env) + # HACK: For global rescue to have access to the original request and response + request = env["action_dispatch.rescue.request"] ||= ActionDispatch::Request.new(env) + response = env["action_dispatch.rescue.response"] ||= ActionDispatch::Response.new + process(request, response).to_a + end + # Extracts the action_name from the request parameters and performs that action. def process(request, response, method = :perform_action, *arguments) #:nodoc: response.request = request |