Controllers
suggest changeController class names are plural. A controller handles many records, not one instance.
For Example: OrdersController would be the controller for an orders table. Rails will then look for the class definition in a file called orders_controller.rb in the /app/controllers directory.
For Example: PostsController would be the controller for a posts table.
If the controller class name has multiple capitalized words, the table name is assumed to have underscores between these words.
For example: a controller named PendingOrdersController is defined in pending_orders_controller.rb.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents