diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-02 16:18:03 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-02 16:18:03 -0500 |
commit | 942fe6514cc0db10c04fd2b46f8e1537beabef71 (patch) | |
tree | 8b9d057a91861756260aea7990308975305ab475 /actionpack/lib/action_controller/metal/rack_delegation.rb | |
parent | 02512914ae547eb664a78c0f6084b121d5283a61 (diff) | |
parent | ffe001f19dbbd9e697f6300650779f5e1391ce1e (diff) | |
download | rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.tar.gz rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.tar.bz2 rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/metal/rack_delegation.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/rack_delegation.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/rack_delegation.rb b/actionpack/lib/action_controller/metal/rack_delegation.rb index 060117756e..508ea6e2b7 100644 --- a/actionpack/lib/action_controller/metal/rack_delegation.rb +++ b/actionpack/lib/action_controller/metal/rack_delegation.rb @@ -8,10 +8,10 @@ module ActionController delegate :headers, :status=, :location=, :content_type=, :status, :location, :content_type, :to => "@_response" - def dispatch(action, request) - @_response = ActionDispatch::Response.new - @_response.request = request - super + def dispatch(action, request, response = ActionDispatch::Response.new) + @_response ||= response + @_response.request ||= request + super(action, request) end def params |