From 0189fb76e3c38ef9a0d292135683b0d135c4a369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 2 Jul 2010 08:13:52 +0200 Subject: reload_routes! was still referencing old Rails::Application. --- railties/lib/rails/application.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index f61103c764..458177b954 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -121,14 +121,13 @@ module Rails end def reload_routes! - routes = Rails::Application.routes - routes.disable_clear_and_finalize = true - - routes.clear! + _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! } + ActiveSupport.on_load(:action_controller) { _routes.finalize! } ensure - routes.disable_clear_and_finalize = false + _routes.disable_clear_and_finalize = false end def initialize! -- cgit v1.2.3