action_controller.rb 2.2 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
  autoload :Base
  autoload :Caching
  autoload :Metal
  autoload :Middleware
11

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

37 38 39 40 41
  autoload :Integration,     'action_controller/deprecated/integration_test'
  autoload :IntegrationTest, 'action_controller/deprecated/integration_test'
  autoload :PerformanceTest, 'action_controller/deprecated/performance_test'
  autoload :UrlWriter,       'action_controller/deprecated'
  autoload :Routing,         'action_controller/deprecated'
42
  autoload :TestCase,        'action_controller/test_case'
C
Carlhuda 已提交
43

J
Joshua Peek 已提交
44 45
  eager_autoload do
    autoload :RecordIdentifier
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

    # 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 已提交
61 62
  end
end
63

C
Carlhuda 已提交
64
# All of these simply register additional autoloads
65
require 'action_view'
C
Carlhuda 已提交
66
require 'action_controller/vendor/html-scanner'
67

68
# Common Active Support usage in Action Controller
69
require 'active_support/concern'
70 71 72 73 74
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'
75
require 'active_support/core_ext/uri'
76
require 'active_support/inflector'