diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-07-15 14:15:52 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-07-15 14:15:52 -0700 |
commit | 28508d444e36dc8b5819f011f0a2398f44d8d3e3 (patch) | |
tree | 83be0aaaaaccd965ace1d103850bda9bdcbab29a | |
parent | b0429f5e66b4e33f9d0ba7b066a3dbfdab68534c (diff) | |
download | rails-28508d444e36dc8b5819f011f0a2398f44d8d3e3.tar.gz rails-28508d444e36dc8b5819f011f0a2398f44d8d3e3.tar.bz2 rails-28508d444e36dc8b5819f011f0a2398f44d8d3e3.zip |
Centralize commonly used parts of AS in ActionController into action_controller.rb
-rw-r--r-- | actionpack/lib/action_controller.rb | 16 | ||||
-rw-r--r-- | actionpack/lib/action_controller/abstract/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/abstract/callbacks.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/abstract/logger.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_controller/base/helpers.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/base/http.rb | 1 |
6 files changed, 15 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index e822a11d14..32572c93c0 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -52,11 +52,21 @@ module ActionController autoload :SessionOverflowError, 'action_controller/base/exceptions' autoload :UnknownHttpMethod, 'action_controller/base/exceptions' - require 'action_controller/routing' + autoload :Routing, 'action_controller/routing' end autoload :HTML, 'action_controller/vendor/html-scanner' autoload :AbstractController, 'action_controller/abstract' -require 'action_dispatch' -require 'action_view' +autoload :Rack, 'action_dispatch' +autoload :ActionDispatch, 'action_dispatch' +autoload :ActionView, 'action_view' + +# Common ActiveSupport usage in ActionController +require "active_support/concern" +require 'active_support/core_ext/class/attribute_accessors' +require 'active_support/core_ext/load_error' +require 'active_support/core_ext/module/attr_internal' +require 'active_support/core_ext/module/delegation' +require 'active_support/core_ext/name_error' +require 'active_support/inflector'
\ No newline at end of file diff --git a/actionpack/lib/action_controller/abstract/base.rb b/actionpack/lib/action_controller/abstract/base.rb index a19a236ef7..ca00e66349 100644 --- a/actionpack/lib/action_controller/abstract/base.rb +++ b/actionpack/lib/action_controller/abstract/base.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/module/attr_internal' - module AbstractController class Base diff --git a/actionpack/lib/action_controller/abstract/callbacks.rb b/actionpack/lib/action_controller/abstract/callbacks.rb index 0d5161c80e..ea4b59466e 100644 --- a/actionpack/lib/action_controller/abstract/callbacks.rb +++ b/actionpack/lib/action_controller/abstract/callbacks.rb @@ -1,3 +1,5 @@ +require "active_support/new_callbacks" + module AbstractController module Callbacks extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/abstract/logger.rb b/actionpack/lib/action_controller/abstract/logger.rb index b960e152e3..fd33bd2ddd 100644 --- a/actionpack/lib/action_controller/abstract/logger.rb +++ b/actionpack/lib/action_controller/abstract/logger.rb @@ -1,4 +1,3 @@ -require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/logger' module AbstractController diff --git a/actionpack/lib/action_controller/base/helpers.rb b/actionpack/lib/action_controller/base/helpers.rb index 2fa5ea6519..7c52779064 100644 --- a/actionpack/lib/action_controller/base/helpers.rb +++ b/actionpack/lib/action_controller/base/helpers.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/load_error' -require 'active_support/core_ext/name_error' require 'active_support/dependencies' module ActionController diff --git a/actionpack/lib/action_controller/base/http.rb b/actionpack/lib/action_controller/base/http.rb index ec78bc15a8..3efd1b656f 100644 --- a/actionpack/lib/action_controller/base/http.rb +++ b/actionpack/lib/action_controller/base/http.rb @@ -1,5 +1,4 @@ require 'action_controller/abstract' -require 'active_support/core_ext/module/delegation' module ActionController # ActionController::Http provides a way to get a valid Rack application from a controller. |