diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-30 10:30:58 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-30 10:30:58 +0200 |
commit | 1ba22bcde1d5ee1e16e14d4d2dd23cbeb01cd59f (patch) | |
tree | 0c74273f34c20e56975a6b7845a034fa3df8c469 /railties/lib/rails/application.rb | |
parent | 69f97f469747777ed1c457715f5361f6b8a0ab7b (diff) | |
parent | 9f569c60adb3505cd7ca1723481199bf26619038 (diff) | |
download | rails-1ba22bcde1d5ee1e16e14d4d2dd23cbeb01cd59f.tar.gz rails-1ba22bcde1d5ee1e16e14d4d2dd23cbeb01cd59f.tar.bz2 rails-1ba22bcde1d5ee1e16e14d4d2dd23cbeb01cd59f.zip |
Merge remote branch 'drogus/engines'
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 0e85e6d1d5..aafbbc29ee 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -39,6 +39,7 @@ module Rails autoload :Configuration, 'rails/application/configuration' autoload :Finisher, 'rails/application/finisher' autoload :Railties, 'rails/application/railties' + autoload :RoutesReloader, 'rails/application/routes_reloader' class << self def inherited(base) @@ -81,17 +82,7 @@ module Rails end def routes_reloader - @routes_reloader ||= ActiveSupport::FileUpdateChecker.new([]){ reload_routes! } - end - - def reload_routes! - _routes = self.routes - _routes.disable_clear_and_finalize = true - _routes.clear! - routes_reloader.paths.each { |path| load(path) } - ActiveSupport.on_load(:action_controller) { _routes.finalize! } - ensure - _routes.disable_clear_and_finalize = false + @routes_reloader ||= RoutesReloader.new end def initialize! |