diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-05 21:44:49 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-05 21:44:49 +0200 |
commit | 6671d9cdc1cc40a6cdd365902f76d4aca78a410c (patch) | |
tree | c0016fb72589362b2e149d8c37017fb0ca171889 /actionpack/lib | |
parent | a5dda97602f2188a13cbcab5c7e9a5ba84ba876b (diff) | |
download | rails-6671d9cdc1cc40a6cdd365902f76d4aca78a410c.tar.gz rails-6671d9cdc1cc40a6cdd365902f76d4aca78a410c.tar.bz2 rails-6671d9cdc1cc40a6cdd365902f76d4aca78a410c.zip |
RouteSet should also handle anonymous classes.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/deprecated_mapper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb index 05e8dfded6..b3146a1c60 100644 --- a/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb +++ b/actionpack/lib/action_dispatch/routing/deprecated_mapper.rb @@ -20,8 +20,8 @@ module ActionDispatch def in_memory_controller_namespaces namespaces = Set.new ActionController::Base.descendants.each do |klass| - controller_name = klass.name.underscore - namespaces << controller_name.split('/')[0...-1].join('/') + next if klass.anonymous? + namespaces << klass.name.underscore.split('/')[0...-1].join('/') end namespaces.delete('') namespaces |