Skip to content
Browse files

Fixes a bug in routes controller traversing which caused it to fail o…

…n for double nested controllers. [Tobias Luetke]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2429074 commit 7bbc759dc0b47019972166e08ddabd4a0f4fef34 Tobias Lütke committed Mar 15, 2006
Showing with 3 additions and 2 deletions.
  1. +3 −2 actionpack/lib/action_controller/routing.rb
View
5 actionpack/lib/action_controller/routing.rb
@@ -241,15 +241,16 @@ def traverse_to_controller(segments, start_at = 0)
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
next_mod = eval("mod::#{mod_name}", nil, __FILE__, __LINE__)
# 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

0 comments on commit 7bbc759

Please sign in to comment.
Something went wrong with that request. Please try again.