Skip to content

Commit

Permalink
reload_routes! was still referencing old Rails::Application.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jul 2, 2010
1 parent 2ef8a2b commit 0189fb7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions railties/lib/rails/application.rb
Expand Up @@ -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!
Expand Down

0 comments on commit 0189fb7

Please sign in to comment.