Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reload_routes! was still referencing old Rails::Application.

  • Loading branch information...
commit 0189fb76e3c38ef9a0d292135683b0d135c4a369 1 parent 2ef8a2b
@josevalim josevalim authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 railties/lib/rails/application.rb
View
11 railties/lib/rails/application.rb
@@ -121,14 +121,13 @@ def routes_reloader
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!
Please sign in to comment.
Something went wrong with that request. Please try again.