Topic: Namespaces or prefixes for controllers

Hello fellas!
I have two Devise models (Doctor and Patient) in my app. And i have two different sets of controllers for each one. At the moment i just prefixing each controller like this: PatientRegistrationsController, DoctorRegistrationsController etc. But now i'm thinking about using namespaces for better app organization and structure.
Help me deciding which strategy i should use with my controllers - namespaces or prefixing names. Is where any gotchas with namespaces?

Last edited by tipugin (2012-01-02 15:06:05)

Re: Namespaces or prefixes for controllers

There are no gotchas with namespaces other than to remeber to update any urls/locations.

Check this link out. It's an old post but I still use it and it's just as valid for Rails 3.x
Be sure to read the comments especially mine (Jamesw) with regards to the delete method and the location … caffolding

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)