routing episodes
#34
May 21
12 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.
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.
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.
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.
Custom Routes
In this episode you will learn how to add custom routes, make some parameters optional, and add requirements for other parameters.
Generate Named Routes
This more advanced episode will show you how to dynamically generate named routes by adding a method to the map object.
Generating RSS Feeds
See how to easily generate and link to an RSS feed using new features in Rails 2.0. Watch this episode or details.



