Chapter 4. Writing Custom Routes

The default route is a very general one. Its purpose is to catch all routes that haven’t matched already. Now we’re going to look at that already part: the routes defined earlier in the routes.rb file, routes that match more narrowly than the general one at the bottom of the file.

You’ve already seen the major components that you can put into a route: static strings, bound parameters (usually including :controller and often including :action), and wildcard ...

Get Rails Routing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.