diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-17 11:09:14 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-17 12:24:59 -0500 |
commit | c3319504f066c9362b4b30e1e15bbd1cadde8e25 (patch) | |
tree | 2576c06099ec7be06e08e695e4d8a1086ccdfe48 /actionpack | |
parent | 98eaa2c6834e418959f2a1a18421e4811167e03b (diff) | |
download | rails-c3319504f066c9362b4b30e1e15bbd1cadde8e25.tar.gz rails-c3319504f066c9362b4b30e1e15bbd1cadde8e25.tar.bz2 rails-c3319504f066c9362b4b30e1e15bbd1cadde8e25.zip |
Rescue hack was supposed to be removed. Some how it crept back in.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/base/base.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_controller/testing/process.rb | 3 | ||||
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/helper_test.rb | 3 |
4 files changed, 2 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/base/base.rb b/actionpack/lib/action_controller/base/base.rb index 2813e71d12..c59068c628 100644 --- a/actionpack/lib/action_controller/base/base.rb +++ b/actionpack/lib/action_controller/base/base.rb @@ -368,9 +368,8 @@ module ActionController #:nodoc: attr_reader :template def action(name, 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 + request = ActionDispatch::Request.new(env) + response = ActionDispatch::Response.new self.action_name = name && name.to_s process(request, response).to_a end diff --git a/actionpack/lib/action_controller/testing/process.rb b/actionpack/lib/action_controller/testing/process.rb index 8f4358c33e..8831ff57e2 100644 --- a/actionpack/lib/action_controller/testing/process.rb +++ b/actionpack/lib/action_controller/testing/process.rb @@ -132,9 +132,6 @@ module ActionController #:nodoc: @request.session["flash"] = ActionController::Flash::FlashHash.new.update(flash) if flash build_request_uri(action, parameters) - @request.env["action_controller.rescue.request"] = @request - @request.env["action_controller.rescue.response"] = @response - Base.class_eval { include ProcessWithTest } unless Base < ProcessWithTest env = @request.env diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index 9ad49e9282..afefc6a77e 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -607,7 +607,6 @@ class FilterTest < Test::Unit::TestCase def test_dynamic_dispatch %w(foo bar baz).each do |action| request = ActionController::TestRequest.new - request.env["action_controller.rescue.request"] = request request.query_parameters[:choose] = action response = DynamicDispatchController.action.call(request.env).last assert_equal action, response.body diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 7b8096fccc..3bbda9eb3a 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -104,7 +104,6 @@ class HelperTest < Test::Unit::TestCase def call_controller(klass, action) request = ActionController::TestRequest.new - request.env["action_controller.rescue.request"] = request klass.action(action).call(request.env) end @@ -112,7 +111,6 @@ class HelperTest < Test::Unit::TestCase assert_equal 'hello: Iz guuut!', call_controller(Fun::GamesController, "render_hello_world").last.body # request = ActionController::TestRequest.new - # request.env["action_controller.rescue.request"] = request # # resp = Fun::GamesController.action(:render_hello_world).call(request.env) # assert_equal 'hello: Iz guuut!', resp.last.body @@ -217,7 +215,6 @@ class IsolatedHelpersTest < Test::Unit::TestCase def call_controller(klass, action) request = ActionController::TestRequest.new - request.env["action_controller.rescue.request"] = request klass.action(action).call(request.env) end |