aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/dispatcher.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-01-01 18:13:14 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-01-01 18:13:14 +0100
commitf1e20ce9a781eb73e421678fc8149eba77ddc6f6 (patch)
treec88842ff5196f2fe0bd02af6d544f9dc87647789 /actionpack/lib/action_controller/dispatcher.rb
parent49a055dff639164435dfb71bf18d695970eedac9 (diff)
parenta5004573d8d132fe079242fc082ab4661b0976e9 (diff)
downloadrails-f1e20ce9a781eb73e421678fc8149eba77ddc6f6.tar.gz
rails-f1e20ce9a781eb73e421678fc8149eba77ddc6f6.tar.bz2
rails-f1e20ce9a781eb73e421678fc8149eba77ddc6f6.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/dispatcher.rb')
-rw-r--r--actionpack/lib/action_controller/dispatcher.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb
index 4dc76e1b49..c4e7357b81 100644
--- a/actionpack/lib/action_controller/dispatcher.rb
+++ b/actionpack/lib/action_controller/dispatcher.rb
@@ -60,11 +60,10 @@ module ActionController
def dispatch
begin
run_callbacks :before_dispatch
- controller = Routing::Routes.recognize(@request)
- controller.process(@request, @response).to_a
+ Routing::Routes.call(@env)
rescue Exception => exception
if controller ||= (::ApplicationController rescue Base)
- controller.process_with_exception(@request, @response, exception).to_a
+ controller.call_with_exception(@env, exception).to_a
else
raise exception
end
@@ -83,8 +82,7 @@ module ActionController
end
def _call(env)
- @request = Request.new(env)
- @response = Response.new
+ @env = env
dispatch
end
@@ -110,8 +108,7 @@ module ActionController
def checkin_connections
# Don't return connection (and peform implicit rollback) if this request is a part of integration test
- # TODO: This callback should have direct access to env
- return if @request.key?("rack.test")
+ return if @env.key?("rack.test")
ActiveRecord::Base.clear_active_connections!
end
end