From 6bbe965ccdcef2d7e713e65175722718d325b2bd Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 27 May 2009 10:40:43 +0200 Subject: Reduce the cost of using ActionController::Http significantly by: * Removing the dependency on AD::Request and AD::Response * Moving the logic for the request and response object into a new module that is included by default. * Changing Renderer and Redirector to use self.headers, self.content_type, and self.status, which have very basic default implementations on AC::Http. When RackConvenience is included (which it is by default on AC::Base), the full Request/Response logic is used instead of the simple logic. --- actionpack/lib/action_controller/new_base/url_for.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/lib/action_controller/new_base/url_for.rb') diff --git a/actionpack/lib/action_controller/new_base/url_for.rb b/actionpack/lib/action_controller/new_base/url_for.rb index 94de9fab50..e6e5d3acce 100644 --- a/actionpack/lib/action_controller/new_base/url_for.rb +++ b/actionpack/lib/action_controller/new_base/url_for.rb @@ -1,5 +1,9 @@ module ActionController module UrlFor + extend ActiveSupport::DependencyModule + + depends_on RackConvenience + def process_action(*) initialize_current_url super -- cgit v1.2.3