I believe current recommended practice is to have plural controllers.
script/generate scaffold widget
creates app/models/widget.rb and app/controllers/
widgets_controller.rb What does a WidgetsController do? It controls
all widgets (note the plural).
grzm seespotcode net
Here’s how I see it (one mans opinion)
DB Table => Plural (products, people, invoices… etc)
Model => Singular (product, person, invoice… etc)
Controler => Doesn’t matter. So long as you understand the connection.
store (controller managing products)
user_admin (controller managing the people in your site)
accounting (controller for invoices)
Yes granted you could pluralize your controllers, but I think since a
controller wraps functionality around your models (its’ the CRUD after
all) and isn’t just a series / list of models itself; making the name
descriptive makes more sense to me.
Also, don’t forget, eventually once you get past “scaffolding-only”
controller code your controller will be managing business logic around
your model and not just the state of a model itself. So it will grow
beyond the definition of “People, Invoices or Products” as a