action_controller.rb 1.9 KB
Newer Older
1
require 'active_support/rails'
2 3
require 'abstract_controller'
require 'action_dispatch'
4
require 'action_controller/metal/live'
C
Carlhuda 已提交
5

6
module ActionController
C
Carlhuda 已提交
7
  extend ActiveSupport::Autoload
8

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

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

41 42 43 44 45 46
  autoload :Integration,        'action_controller/deprecated/integration_test'
  autoload :IntegrationTest,    'action_controller/deprecated/integration_test'
  autoload :PerformanceTest,    'action_controller/deprecated/performance_test'
  autoload :Routing,            'action_controller/deprecated'
  autoload :TestCase,           'action_controller/test_case'
  autoload :TemplateAssertions, 'action_controller/test_case'
C
Carlhuda 已提交
47

J
Joshua Peek 已提交
48 49
  eager_autoload do
    autoload :RecordIdentifier
C
Carlhuda 已提交
50
  end
51 52 53 54 55 56

  def self.eager_load!
    super
    ActionController::Caching.eager_load!
    HTML.eager_load!
  end
C
Carlhuda 已提交
57
end
58

C
Carlhuda 已提交
59
# All of these simply register additional autoloads
60
require 'action_view'
C
Carlhuda 已提交
61
require 'action_controller/vendor/html-scanner'
62

63
# Common Active Support usage in Action Controller
64 65 66 67
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/name_error'
68
require 'active_support/core_ext/uri'
69
require 'active_support/inflector'