1
:/products
). This means that:get '/'
maps to the route /products/
get '/:id'
maps to the route /products/:id
MainController
) works slightly differently. Since it inherits directly from ApplicationController
, you cannot specify a base route, as the controller is always mounted at /
.