1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fixed small bug in routing which caused the traverse_to_controller mechanism to drop out on

Multi::Nested::Controllers


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3538 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Tobias Lütke 2006-02-04 22:04:19 +00:00
parent 6fa5b7b304
commit 28cee08fa4

View file

@ -244,7 +244,7 @@ module ActionController
mod = suppress(NameError) do
next_mod = eval("mod::#{mod_name}", nil, __FILE__, __LINE__)
# Check that we didn't get a module from a parent namespace
(mod == Object || next_mod.name == "#{mod.name}::#{controller_name}") ? next_mod : nil
(mod == Object || next_mod.name == "#{mod.name}::#{mod_name}") ? next_mod : nil
end
raise RoutingError, "Cannot find controller: Dropped out at #{segments[start_at..index] * '/'}" unless mod