diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-28 15:31:03 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-28 15:31:03 -0600 |
commit | 5d89605c11cc54acadfdd76ccd226d38989ec600 (patch) | |
tree | 07a06d5b9584d8ae98f32781517007eafccd5fad /actionpack/lib/action_controller/base.rb | |
parent | 45dee3842d68359a189fe7c0729359bd5a905ea4 (diff) | |
download | rails-5d89605c11cc54acadfdd76ccd226d38989ec600.tar.gz rails-5d89605c11cc54acadfdd76ccd226d38989ec600.tar.bz2 rails-5d89605c11cc54acadfdd76ccd226d38989ec600.zip |
Make router and controller classes better rack citizens
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 5b83494eb4..da3d1f46ee 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -382,6 +382,13 @@ module ActionController #:nodoc: attr_accessor :action_name class << self + def call(env) + # HACK: For global rescue to have access to the original request and response + request = env["actioncontroller.rescue.request"] ||= Request.new(env) + response = env["actioncontroller.rescue.response"] ||= Response.new + process(request, response) + end + # Factory for the standard create, process loop where the controller is discarded after processing. def process(request, response) #:nodoc: new.process(request, response) |