diff options
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 |