diff options
author | John Firebaugh <john_firebaugh@us.ibm.com> | 2010-12-19 15:58:58 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-12-20 12:43:02 +0100 |
commit | 435bccda930e4dde3d0fafca958e1c8330b4c3ca (patch) | |
tree | d0f4eb51a6cc7cedb292da1125ed3b5eea4c7de3 /railties/lib/rails/application/finisher.rb | |
parent | 0f7c970e4f1cf0f3bcc01c22a6a3038cb3e34668 (diff) | |
download | rails-435bccda930e4dde3d0fafca958e1c8330b4c3ca.tar.gz rails-435bccda930e4dde3d0fafca958e1c8330b4c3ca.tar.bz2 rails-435bccda930e4dde3d0fafca958e1c8330b4c3ca.zip |
Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index e3342be7ee..a45b61c99c 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -21,7 +21,7 @@ module Rails initializer :add_to_prepare_blocks do config.to_prepare_blocks.each do |block| - ActionDispatch::Callbacks.to_prepare(&block) + ActionDispatch::Reloader.to_prepare(&block) end end @@ -37,6 +37,10 @@ module Rails build_middleware_stack end + initializer :run_prepare_callbacks do + ActionDispatch::Reloader.prepare! + end + initializer :eager_load! do if config.cache_classes && !$rails_rake_task ActiveSupport.run_load_hooks(:before_eager_load, self) @@ -52,7 +56,7 @@ module Rails initializer :set_routes_reloader do |app| reloader = lambda { app.routes_reloader.execute_if_updated } reloader.call - ActionDispatch::Callbacks.to_prepare(&reloader) + ActionDispatch::Reloader.to_prepare(&reloader) end # Disable dependency loading during request cycle |