diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-02 08:13:52 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-02 08:13:52 +0200 |
commit | 0189fb76e3c38ef9a0d292135683b0d135c4a369 (patch) | |
tree | 9093f098f43d1a107055483191f66a061ace24b2 | |
parent | 2ef8a2b403adcee21fe1a5bfadc125b24779cd53 (diff) | |
download | rails-0189fb76e3c38ef9a0d292135683b0d135c4a369.tar.gz rails-0189fb76e3c38ef9a0d292135683b0d135c4a369.tar.bz2 rails-0189fb76e3c38ef9a0d292135683b0d135c4a369.zip |
reload_routes! was still referencing old Rails::Application.
-rw-r--r-- | railties/lib/rails/application.rb | 11 |
1 files changed, 5 insertions, 6 deletions
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! |