mirror of
https://github.com/github/rails.git
synced 2026-01-29 08:18:03 -05:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user