diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-12 14:39:22 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-12 14:57:09 +0100 |
commit | 5c234ab8ed4659a74a6c47ce8337055a62f75eff (patch) | |
tree | 9c2fe11cf2729deeef03c2eebe8563f56e8e6def | |
parent | 9147613ce09710e70790ac45d3b20c3ef6c1fa46 (diff) | |
download | rails-5c234ab8ed4659a74a6c47ce8337055a62f75eff.tar.gz rails-5c234ab8ed4659a74a6c47ce8337055a62f75eff.tar.bz2 rails-5c234ab8ed4659a74a6c47ce8337055a62f75eff.zip |
Composition > inheritance.
-rw-r--r-- | railties/lib/rails/application/routes_reloader.rb | 14 |
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 |