The fictitious Rails application has the following resources:
Photographers
Images
Comments
A Photographerhas many Imagesthat have manyComments
Each photographer has a login and can view, upload, edit and delete their images, comments, as well as their own profile.
An administration interface is available and can edit images, photographers and comments.
In addition, the photographer, their images and their comments are accessible from an open interface without logging in, where visitors can add comments.
My question is: what is the Rails way to structure controllers? I thought about going with namespaces for each role (public, account, admin) as follows:
Admin::PhotographersController
Admin::ImagesController
Admin::CommentsController
AccountController (?)
Account::ImagesController
Account::CommentsController
PhotographersController
ImagesController
CommentsController
- . , DRY?
!