RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: routes x
Action Controller Walkthrough
Episode #395Dec 02, 201277 comments

Action Controller Walkthrough

Do you ever wonder what goes on behind the scenes when a Rails controller handles a request? What do the "render" and "redirect_to" methods do exactly? This and more covered as we walk through the code of ActionController::Base. (11 minutes)
Semi-Static Pages (revised)
Episode #117Sep 02, 201270 comments

Semi-Static Pages (revised)

There are many ways to handle static pages in a Rails application. Here I show two approaches including one that uses a RESTful style PagesController to keep the content in the database (8 minutes)
Authentication with Warden
Episode #305Dec 05, 201144 comments

Authentication with Warden

Warden makes it easy to move authentication up into Rack middleware. This means authentication can be accessed outside of a Rails controller such as in routes or in a mountable engine. (12 minutes)
OAuth with Doorkeeper
Episode #353May 23, 201290 comments

OAuth with Doorkeeper

Doorkeeper makes it easy to create an OAuth 2 provider. This episode also shows how to setup OmniAuth as an OAuth client and use the oauth2 gem to communicate with an API. (19 minutes)
I18n (revised)
Episode #138Mar 29, 201279 comments

I18n (revised)

Translate a site into other languages through internationalization (I18n). Here I show how to store a locale in the URL and manage translated text through YAML files. (10 minutes)
Destroy without JavaScript (revised)
Episode #77Jun 16, 201248 comments

Destroy without JavaScript (revised)

A destroy link in Rails does not work without JavaScript. In this episode I show two techniques for gracefully degrading destroy links: button_to and a delete action. (8 minutes)
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)
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)
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)