From 8d809e724ac3e5ebc7f35e40f95632c853c68d89 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sat, 23 Sep 2006 17:25:06 +0000 Subject: Clear the cache of possible controllers whenever Routes are reloaded. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/routing.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/routing.rb') diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index c309878dbd..9fe886d958 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -243,10 +243,11 @@ module ActionController class << self def with_controllers(names) + prior_controllers = @possible_controllers use_controllers! names yield ensure - use_controllers! nil + use_controllers! prior_controllers end def normalize_paths(paths) @@ -1127,6 +1128,7 @@ module ActionController end def load! + Routing.use_controllers! nil # Clear the controller cache so we may discover new ones clear! load_routes! named_routes.install -- cgit v1.2.3