action_controller.rb 2.3 KB
Newer Older
1 2
require 'abstract_controller'
require 'action_dispatch'
C
Carlhuda 已提交
3

4
module ActionController
C
Carlhuda 已提交
5
  extend ActiveSupport::Autoload
6

J
Joshua Peek 已提交
7 8 9 10 11
  autoload :Base
  autoload :Caching
  autoload :PolymorphicRoutes
  autoload :Metal
  autoload :Middleware
12

J
Joshua Peek 已提交
13
  autoload_under "metal" do
14
    autoload :Compatibility
J
Joshua Peek 已提交
15 16
    autoload :ConditionalGet
    autoload :Configuration
17 18
    autoload :Cookies
    autoload :Flash
J
Joshua Peek 已提交
19 20 21
    autoload :Head
    autoload :Helpers
    autoload :HideActions
22
    autoload :HttpAuthentication
23
    autoload :Instrumentation
J
Joshua Peek 已提交
24 25 26 27
    autoload :MimeResponds
    autoload :RackDelegation
    autoload :Redirecting
    autoload :Renderers
28
    autoload :Rendering
29
    autoload :RequestForgeryProtection
J
Joshua Peek 已提交
30 31 32
    autoload :Rescue
    autoload :Responder
    autoload :SessionManagement
33
    autoload :Streaming
34
    autoload :Testing
35
    autoload :UrlFor
J
Joshua Peek 已提交
36
    autoload :Verification
37
  end
38

39
  autoload :Dispatcher,      'action_controller/deprecated/dispatcher'
J
Joshua Peek 已提交
40 41
  autoload :Integration,     'action_controller/deprecated/integration_test'
  autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
42
  autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
43
  autoload :UrlWriter,       'action_controller/deprecated'
44 45
  autoload :Routing,         'action_controller/deprecated'
  autoload :TestCase,        'action_controller/test_case'
C
Carlhuda 已提交
46

J
Joshua Peek 已提交
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  eager_autoload do
    autoload :RecordIdentifier
    autoload :UrlRewriter

    # TODO: Don't autoload exceptions, setup explicit
    # requires for files that need them
    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
C
Carlhuda 已提交
65 66
  end
end
67

C
Carlhuda 已提交
68
# All of these simply register additional autoloads
69
require 'action_view'
C
Carlhuda 已提交
70
require 'action_controller/vendor/html-scanner'
71 72

# Common ActiveSupport usage in ActionController
73
require 'active_support/concern'
74 75 76 77 78
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'
79
require 'active_support/inflector'