diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2006-03-15 22:48:22 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2006-03-15 22:48:22 +0000 |
commit | 7bbc759dc0b47019972166e08ddabd4a0f4fef34 (patch) | |
tree | eb3b9cf4fc454897b2d1132d26604a2f07eca189 | |
parent | 2429074075b08b219f4dbbe8f6d08598c1d67878 (diff) | |
download | rails-7bbc759dc0b47019972166e08ddabd4a0f4fef34.tar.gz rails-7bbc759dc0b47019972166e08ddabd4a0f4fef34.tar.bz2 rails-7bbc759dc0b47019972166e08ddabd4a0f4fef34.zip |
Fixes a bug in routes controller traversing which caused it to fail on for double nested controllers. [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 3354e8444f..aaac0dd77d 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -241,7 +241,7 @@ module ActionController return controller, (index - start_at) end rescue NameError => e - raise unless /^uninitialized constant #{controller_name}$/ =~ e.message + raise unless /^uninitialized constant .*#{controller_name}$/ =~ e.message end begin @@ -249,7 +249,8 @@ module ActionController # Check that we didn't get a module from a parent namespace mod = (mod == Object || next_mod.name == "#{mod.name}::#{mod_name}") ? next_mod : nil rescue NameError => e - raise unless /^uninitialized constant #{mod_name}$/ =~ e.message + breakpoint + raise unless /^uninitialized constant .*#{mod_name}$/ =~ e.message end return nil unless mod |