Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set the request and response in ActionController::Middleware

  • Loading branch information...
commit 289076066551b5439e48ef743ca277af95eba36c 1 parent efbd535
Carl Lerche authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/lib/action_controller/middleware.rb
View
4 actionpack/lib/action_controller/middleware.rb
@@ -7,6 +7,7 @@ def initialize(controller)
def call(env)
controller = @controller.allocate
+ controller.send(:initialize)
controller.app = @app
controller._call(env)
end
@@ -24,6 +25,9 @@ def self.new(app)
def _call(env)
@_env = env
+ @_request = ActionDispatch::Request.new(env)
+ @_response = ActionDispatch::Response.new
+ @_response.request = request
process(:index)
end
Please sign in to comment.
Something went wrong with that request. Please try again.