has been a couple of blogs (one posted at weblog.rubyonrails.com
“Things you shouldn’t do in Rails”) that are stating namespacing
controllers are bad and that you should avoid using them.
This idea does not sit well with me and am curious as to the Rails
roadmap. I’ve seen a couple things demonstrated in examples (Rails
Book, api) that later become deprecated. As others have suggested, a
resource for features/methodologies that are or will be deprecated
would be a very nice addition.
I use controller namespacing and am getting the uneasy feeling
that there is a growing anti-namespacing controller sentiment. I don’t think this would be deprecated, but it could surely go the way of: “not supported - aka we don’t test for that”. To me, this would be very bad as
my authorization code is built to take advantage of namespacing.
the following statement: “if your models aren’t namespaced , why should
your controllers be?” (from: http://tinyurl.com/p9odk ) , well I
respond by saying models don’t contain business logic, controllers do.
The duty of the model is to simply provide CRUD methods to your
database. Controllers utilize these models to provide functionality as
the business requires.
I don’t find myself violating the DRY principle by namespacing
controllers, I use partials and lib files to keep it that way. In
fact, putting some functionality into the lib directory has made it
easy for me to utilize the same code in multiple projects.
I would like to see what my fellow railers think of
namespacing controllers and would also like to hear from some of the
Is namespacing a real problem or just something some people think is bad design?
p.s. I think I also something about has_and_belongs_to_many on the deprecation list in favor of has_many :though. Is this true?