From f32cf44870549c6cc5b6e6c84cffc1facf6ec38e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 2 May 2009 15:29:18 -0500 Subject: Switch functional tests to run through the rack interface instead of process --- actionpack/lib/action_controller/base/base.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/base/base.rb') 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 -- cgit v1.2.3