aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-09-23 17:25:06 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-09-23 17:25:06 +0000
commit8d809e724ac3e5ebc7f35e40f95632c853c68d89 (patch)
tree6ddf7eca253fc68cffeb943151f70e4508b03895 /actionpack/lib/action_controller/routing.rb
parent704443dcf2b61cedfa91d4352bbb351e17997b7c (diff)
downloadrails-8d809e724ac3e5ebc7f35e40f95632c853c68d89.tar.gz
rails-8d809e724ac3e5ebc7f35e40f95632c853c68d89.tar.bz2
rails-8d809e724ac3e5ebc7f35e40f95632c853c68d89.zip
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
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb4
1 files changed, 3 insertions, 1 deletions
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