Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The routing system does two things: It maps requests to controller action methods, and it enables the dynamic generation of URLs for you for use as arguments to methods like link_to and redirect_to.
Each rule—or to use the more common term, route—specifies a pattern, which will be used both as a template for matching URLs and as a blueprint for creating them. The pattern can be generated automatically based on conventions, such as in the case of REST resources. Patterns can also contain a mixture of static substrings, forward slashes (mimicking URL syntax), and positional segment key parameters that serve as “receptors” for corresponding values in URLs.