1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_controller.rb
Carlhuda c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00

78 lines
2.3 KiB
Ruby

require "active_support"
module ActionController
extend ActiveSupport::Autoload
autoload :Base
autoload :Caching
autoload :PolymorphicRoutes
autoload :RecordIdentifier
autoload :UrlRewriter
autoload :Translation
autoload :Metal
autoload :Middleware
autoload_under "metal" do
autoload :Benchmarking
autoload :ConditionalGet
autoload :Configuration
autoload :Head
autoload :Helpers
autoload :HideActions
autoload :Layouts
autoload :MimeResponds
autoload :RackConvenience
autoload :Compatibility
autoload :Redirector
autoload :RenderingController
autoload :RenderOptions
autoload :Rescue
autoload :Responder
autoload :Session
autoload :SessionManagement
autoload :UrlFor
autoload :Verification
autoload :Flash
autoload :RequestForgeryProtection
autoload :Streaming
autoload :HttpAuthentication
autoload :FilterParameterLogging
autoload :Cookies
end
autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
autoload :Routing, 'action_controller/deprecated'
autoload :Integration, 'action_controller/deprecated/integration_test'
autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
autoload :UrlWriter, 'action_controller/url_rewriter'
autoload_at "action_controller/metal/exceptions" do
autoload :ActionControllerError
autoload :RenderError
autoload :RoutingError
autoload :MethodNotAllowed
autoload :NotImplemented
autoload :UnknownController
autoload :MissingFile
autoload :RenderError
autoload :SessionOverflowError
autoload :UnknownHttpMethod
end
end
# All of these simply register additional autoloads
require 'abstract_controller'
require 'action_dispatch'
require 'action_view'
require 'action_controller/vendor/html-scanner'
# 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'