Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 49 lines (41 sloc) 1.307 kb
4f03603 José Valim Break application.rb file in smaller chunks.
josevalim authored
1 module Rails
2 class Application
3 module Finisher
4 include Initializable
5
924fa08 José Valim First steps into making Plugin < Engine.
josevalim authored
6 initializer :ensure_load_once_paths_as_subset do
7 extra = ActiveSupport::Dependencies.load_once_paths -
8 ActiveSupport::Dependencies.load_paths
9
10 unless extra.empty?
11 abort <<-end_error
12 load_once_paths must be a subset of the load_paths.
13 Extra items in load_once_paths: #{extra * ','}
14 end_error
15 end
16 end
17
d3d4874 José Valim Add config.to_prepare back and add tests for it.
josevalim authored
18 initializer :add_to_prepare_blocks do
19 config.to_prepare_blocks.each do |block|
20 ActionDispatch::Callbacks.to_prepare(&block)
21 end
22 end
23
226d8e7 José Valim Refactor MetalLoader and RoutesReloader to rely less on class configurat...
josevalim authored
24 initializer :add_builtin_route do |app|
4f03603 José Valim Break application.rb file in smaller chunks.
josevalim authored
25 if Rails.env.development?
f38e89c Joshua Peek Move railties/builtin into lib
josh authored
26 app.routes_reloader.paths << File.expand_path('../../info_routes.rb', __FILE__)
4f03603 José Valim Break application.rb file in smaller chunks.
josevalim authored
27 end
28 end
29
e49f94d José Valim Revert behavior from a5684dfa3c16472bfa5d5d861ba78cb6dbadcb59 and ensure...
josevalim authored
30 initializer :build_middleware_stack do
31 app
32 end
33
5d07869 José Valim Ensure all initializers are collections.
josevalim authored
34 initializer :after_initialize do
35 config.after_initialize_blocks.each do |block|
36 block.call(self)
4f03603 José Valim Break application.rb file in smaller chunks.
josevalim authored
37 end
38 end
39
40 # Disable dependency loading during request cycle
5d07869 José Valim Ensure all initializers are collections.
josevalim authored
41 initializer :disable_dependency_loading do
42 if config.cache_classes && !config.dependency_loading
4f03603 José Valim Break application.rb file in smaller chunks.
josevalim authored
43 ActiveSupport::Dependencies.unhook!
44 end
45 end
46 end
47 end
f38e89c Joshua Peek Move railties/builtin into lib
josh authored
48 end
Something went wrong with that request. Please try again.