Permalink
Browse files

Set the request and response in ActionController::Middleware

  • Loading branch information...
1 parent efbd535 commit 289076066551b5439e48ef743ca277af95eba36c Carl Lerche committed Aug 26, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 2890760

Please sign in to comment.