diff options
-rw-r--r-- | railties/lib/rails/application/routes_reloader.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 7f9190b01a..19f616ec50 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -24,12 +24,11 @@ module Rails def updater @updater ||= begin - dirs = @external_routes.inject({}) do |hash, dir| - hash.merge(dir.to_s => ["rb"]) + dirs = @external_routes.each_with_object({}) do |dir, hash| + hash[dir.to_s] = %w(rb) end updater = ActiveSupport::FileUpdateChecker.new(paths, dirs) { reload! } - updater.execute updater end |