diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-13 10:07:02 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-13 10:07:02 +0100 |
commit | 1f5b9bbdb377c1b0e29650a103bf53526ceefdd5 (patch) | |
tree | b330d0a59a93cd128d6199725708a025c4692398 /railties/lib | |
parent | 693d2be82706d7dc40af6860a26330c49c27f151 (diff) | |
download | rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.tar.gz rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.tar.bz2 rails-1f5b9bbdb377c1b0e29650a103bf53526ceefdd5.zip |
Clean up FileUpdateChecker API.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/finisher.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/routes_reloader.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 738fb93994..064723c1e0 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -83,7 +83,7 @@ module Rails 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. - ActionDispatch::Reloader.to_prepare(:prepend => true, &callback) + ActionDispatch::Reloader.to_prepare(:prepend => true){ reloader.execute } else ActionDispatch::Reloader.to_cleanup(&callback) end diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 460b84dfd9..e080481976 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -3,12 +3,12 @@ require "active_support/core_ext/module/delegation" module Rails class Application class RoutesReloader - attr_reader :route_sets - - delegate :paths, :execute_if_updated, :updated?, :to => :@updater + attr_reader :route_sets, :paths + delegate :execute_if_updated, :updated?, :to => :@updater def initialize(updater=ActiveSupport::FileUpdateChecker) - @updater = updater.new([]) { reload! } + @paths = [] + @updater = updater.new(paths) { reload! } @route_sets = [] end |