aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application/finisher.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-12 16:23:50 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-12 16:23:50 +0100
commitc0466603288252a5db8a4d8cf0ca193004a542ea (patch)
tree8964e6e5489a646c423cb3ea2fcc98ad0036482d /railties/lib/rails/application/finisher.rb
parentc2e3ce8d1e1174e66536d59d8d97eb2cc8ce6f25 (diff)
downloadrails-c0466603288252a5db8a4d8cf0ca193004a542ea.tar.gz
rails-c0466603288252a5db8a4d8cf0ca193004a542ea.tar.bz2
rails-c0466603288252a5db8a4d8cf0ca193004a542ea.zip
Give hooks the flexibility to choose the type of callback.
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r--railties/lib/rails/application/finisher.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index 9c25e05ee5..17e7aa0f28 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -66,16 +66,14 @@ module Rails
# Set app reload just after the finisher hook to ensure
# paths added in the hook are still loaded.
- initializer :set_clear_dependencies_hook, :group => :all do |app|
- ActionDispatch::Reloader.to_cleanup(&app.app_reloader_hook)
+ initializer :set_dependencies_hook, :group => :all do |app|
+ app.set_dependencies_hook
end
# Set app reload just after the finisher hook to ensure
# routes added in the hook are still loaded.
- initializer :set_routes_reloader do |app|
- reloader = app.routes_reloader_hook
- reloader.call
- ActionDispatch::Reloader.to_prepare(&reloader)
+ initializer :set_routes_reloader_hook do |app|
+ app.set_routes_reloader_hook
end
# Disable dependency loading during request cycle