RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: Routing x
Generate Named Routes
Episode #79Nov 11, 200731 comments

Generate Named Routes

This more advanced episode will show you how to dynamically generate named routes by adding a method to the map object. (5 minutes)
Custom Routes
Episode #70Sep 10, 200733 comments

Custom Routes

In this episode you will learn how to add custom routes, make some parameters optional, and add requirements for other parameters. (7 minutes)
Model Name in URL
Episode #63Jul 27, 200760 comments

Model Name in URL

By default, Rails uses the model's id in the URL. What if you want to use the name of the model instead? You can change this behavior by overriding the to_param method in the model. Watch this episode for details. (6 minutes)
Catch-all Route
Episode #46Jun 18, 200751 comments

Catch-all Route

Sometimes you need to add complex/dynamic routes. This is often impossible to do in routes.rb, but do not worry. It can be accomplished with a catch-all route. See how in this episode. (5 minutes)
Custom REST Actions
Episode #35May 23, 200765 comments

Custom REST Actions

REST adds many constraints. It restricts your controllers to seven actions. Normally this is okay, but sometimes you need to add your own custom actions. Learn how in this episode. (8 minutes)
Named Routes
Episode #34May 21, 200733 comments

Named Routes

When you add a custom route, make it a named route so you have url helper methods to easily link to that new route. See episode for details. (6 minutes)