Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 43 lines (37 sloc) 1.26 kB
4f03603 @josevalim Break application.rb file in smaller chunks.
josevalim authored
1 module Rails
2 class Application
3 module Finisher
4 include Initializable
5
924fa08 @josevalim 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
4f03603 @josevalim Break application.rb file in smaller chunks.
josevalim authored
18 initializer :add_builtin_route do |app|
19 if Rails.env.development?
20 app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb')
21 end
22 end
23
24 initializer :build_middleware_stack do |app|
25 app.app
26 end
27
28 # Fires the user-supplied after_initialize block (config#after_initialize)
29 initializer :after_initialize do |app|
30 app.config.after_initialize_blocks.each do |block|
31 block.call(app)
32 end
33 end
34
35 # Disable dependency loading during request cycle
36 initializer :disable_dependency_loading do |app|
37 if app.config.cache_classes && !app.config.dependency_loading
38 ActiveSupport::Dependencies.unhook!
39 end
40 end
41 end
42 end
43 end
Something went wrong with that request. Please try again.