From 056042eb829e0507ed605264d43a79ce88112288 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Mon, 8 Mar 2010 16:49:47 -0800 Subject: Simplify the action endpoint: * Remove ActionEndpoint in favor of passing a block to MiddlewareStack * Always create a Request; the performance win of RackDelegation is around the response; the Request object hit is limited to a single object allocation * #dispatch takes a Request --- actionpack/lib/action_controller/metal/rack_delegation.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/rack_delegation.rb b/actionpack/lib/action_controller/metal/rack_delegation.rb index bb55383631..37106733cb 100644 --- a/actionpack/lib/action_controller/metal/rack_delegation.rb +++ b/actionpack/lib/action_controller/metal/rack_delegation.rb @@ -6,14 +6,11 @@ module ActionController extend ActiveSupport::Concern included do - delegate :session, :to => "@_request" delegate :headers, :status=, :location=, :content_type=, :status, :location, :content_type, :to => "@_response" - attr_internal :request end - def dispatch(action, env) - @_request = ActionDispatch::Request.new(env) + def dispatch(action, request) @_response = ActionDispatch::Response.new @_response.request = request super -- cgit v1.2.3