diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-13 11:23:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-13 11:23:21 +0100 |
commit | 80256abb39332dd49996b909d6f0413a15291a90 (patch) | |
tree | fb0492e9ba488746a31d7fcc26873daf5099fb32 /railties/lib/rails/application/finisher.rb | |
parent | 1f5b9bbdb377c1b0e29650a103bf53526ceefdd5 (diff) | |
download | rails-80256abb39332dd49996b909d6f0413a15291a90.tar.gz rails-80256abb39332dd49996b909d6f0413a15291a90.tar.bz2 rails-80256abb39332dd49996b909d6f0413a15291a90.zip |
FileUpdateChecker should be able to handle deleted files.
Diffstat (limited to 'railties/lib/rails/application/finisher.rb')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 064723c1e0..2ce2980b97 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -64,10 +64,9 @@ module Rails # routes added in the hook are still loaded. initializer :set_routes_reloader_hook do reloader = routes_reloader - hook = lambda { reloader.execute_if_updated } - hook.call + reloader.execute_if_updated self.reloaders << reloader - ActionDispatch::Reloader.to_prepare(&hook) + ActionDispatch::Reloader.to_prepare { reloader.execute_if_updated } end # Set app reload just after the finisher hook to ensure @@ -79,7 +78,7 @@ module Rails end if config.reload_classes_only_on_change - reloader = config.file_watcher.new(watchable_args, true, &callback) + reloader = config.file_watcher.new(*watchable_args, &callback) self.reloaders << reloader # We need to set a to_prepare callback regardless of the reloader result, i.e. # models should be reloaded if any of the reloaders (i18n, routes) were updated. |