I have had a similar problem with a heavily moduled application.
Moduling controllers (aka using “Controller Namespaces”) sounds like a
good idea, but practically, in current Rails, the whole thing appears
to be implemented as a half-hearted afterthought.
Concrete examples, please.
IIRC at the beginning you would encounter serious bugs with even the
most basic uses of controller namespaces. Then those bugs were (afaik)
fixed, but you still have some deep issues integrating them with the
rest of the Rails kingdom, e.g. the routes issue you raised and several
important plugins which simply don’t work with moduled controllers.
What are these deep issues and important plugins?
I’d love to hear from someone more informed than me what’s the current
situation with this (rather arcane) aspect of Rails.
Directories correspond to modules. Classes live in files in those directories. No arcane magic lurking here.
My 2 cents:
It doesn’t seem as if the core developers are committed to supporting
controller namespaces. DHH for example explicitly shuns them (see the
RailsConf keynote). So the support for this feature, which had lows and
highs, is likely to see more lows than highs in the future. IMHO the
Rails core team should decree whether they are Evil, in which case they
should be removed to avoid trapping people (and I think they can be a
rather nasty trap), or otherwise that controller namespaces are Good,
in which case support for them should improve, e.g. they should be
better supported by routes.rb and plugins which break on them should be
I’d rather discuss in terms of code and test cases than how DHH seems to you. Rails’ directory/module convention should hold for controllers as well as any other class that the dependencies mechanism autoloads. If you have issues or bugs, report, fix, test, and document them.