aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/application/routes_reloader.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb
index 1d1f5e1b06..c1f435a3ee 100644
--- a/railties/lib/rails/application/routes_reloader.rb
+++ b/railties/lib/rails/application/routes_reloader.rb
@@ -1,13 +1,21 @@
module Rails
class Application
- class RoutesReloader < ::ActiveSupport::FileUpdateChecker
+ class RoutesReloader
attr_reader :route_sets
- def initialize
- super([]) { reload! }
+ def initialize(updater=ActiveSupport::FileUpdateChecker)
+ @updater = updater.new([]) { reload! }
@route_sets = []
end
+ def paths
+ @updater.paths
+ end
+
+ def execute_if_updated
+ @updater.execute_if_updated
+ end
+
def reload!
clear!
load_paths