diff options
author | wycats <wycats@gmail.com> | 2010-06-02 22:56:41 +0200 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-06-02 22:56:41 +0200 |
commit | ffe001f19dbbd9e697f6300650779f5e1391ce1e (patch) | |
tree | 050df0d7f91f012062d0ba6965410da0aff200eb /actionpack/lib/action_controller/metal | |
parent | 26c5680bd01bd0e525eccc5d47a2e7126d9383f7 (diff) | |
download | rails-ffe001f19dbbd9e697f6300650779f5e1391ce1e.tar.gz rails-ffe001f19dbbd9e697f6300650779f5e1391ce1e.tar.bz2 rails-ffe001f19dbbd9e697f6300650779f5e1391ce1e.zip |
Changes made while working on upgrading cells to Rails 3
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/rack_delegation.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 1 |
2 files changed, 5 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 diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index 2ba0d6e5cd..8c25b147ef 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -47,6 +47,7 @@ module ActionController #:nodoc: extend ActiveSupport::Concern include AbstractController::Helpers + include AbstractController::Callbacks included do # Sets the token parameter name for RequestForgery. Calling +protect_from_forgery+ |