Controllers

suggest change

Controller 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents