RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails xRouting x
REST API Versioning
Episode #350 – May 16, 2012 – 108 comments

REST API Versioning

APIs should be consistent, but it is difficult to do this when returning a JSON response along side the HTML interface. Here I show how to add a versioned, RESTful API. The version can be determined from either the URL or HTTP headers. (10 minutes)
Pretty URLs with FriendlyId
Episode #314 – Jan 09, 2012 – 99 comments

Pretty URLs with FriendlyId

If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history. (7 minutes)
Routing Walkthrough Part 2
Episode #232 – Sep 19, 2010 – 37 comments

Routing Walkthrough Part 2

In this episode we continue our look into the Rails 3 router by exploring the Mapper class. (13 minutes)
Nested Resources
Episode #139 – Dec 08, 2008 – 66 comments

Nested Resources

In this episode I show how to nest resources through routing and go into some new additions in Rails 2.2. (10 minutes)
Subdomains
Episode #123 – Aug 18, 2008 – 82 comments

Subdomains

Learn how to unleash the full potential of subdomains with the subdomain-fu Rails plugin in this episode. (18 minutes)
Generating RSS Feeds
Episode #87 – Jan 06, 2008 – 65 comments

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. (6 minutes)
Model Name in URL
Episode #63 – Jul 27, 2007 – 60 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)