In this case we’ve mapped the URL to the list
action of the ProductController
. Omit the action definition to map to the default action of the controller:
An alternative syntax is to assign the controller and action to use within a block passed to the method:
If you have mappings that all fall under a particular path you can group mappings with the group
method:
}
You can also create nested url mappings:
Rewriting specific URIs is often useful when integrating with other frameworks.