RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: migrations xRevised Episodes x
Optimistic Locking (revised)
Episode #59 – Aug 04, 2012 – 135 comments

Optimistic Locking (revised)

There is a chance one user will unintentionally override someone else's changes if they update a record near the same time. One solution is to use optimistic locking. The updated_at column can also be used for this as shown. (8 minutes)
Devise and OmniAuth (revised)
Episode #235 – Jul 13, 2012 – 134 comments

Devise and OmniAuth (revised)

In this episode I build upon a standard Devise setup and show how to add 3rd party authentication using OmniAuth. This includes support for user validations and is compatible with normal password authentication. (10 minutes)
Model Name in URL (revised)
Episode #63 – Dec 16, 2012 – 85 comments

Model Name in URL (revised)

A model's ID in the URL is not very helpful to the user. Consider adding the name which can also improve SEO. Learn how to override to_param, add a slug attribute, and make a catch all route for deep nesting. (9 minutes)
Time Zones (revised)
Episode #106 – Oct 28, 2012 – 93 comments

Time Zones (revised)

Active Support makes it easy to work with time zones. Learn how to add a Time Zone select field to a user form and watch out for the gotchas. (7 minutes)
Tree-Based Navigation (revised)
Episode #162 – Dec 01, 2012 – 93 comments

Tree-Based Navigation (revised)

If your Rails app is content-heavy, consider organizing it in a tree menu structure. Here I show how to add top-level tabs, nested links in a side bar, and breadcrumbs to go up the hierarchy. (10 minutes)
Devise (revised)
Episode #209 – Jul 06, 2012 – 75 comments

Devise (revised)

Devise is one of the most popular authentication plugins for Rails. Here I show how to set it up with a User model and configure the modules, views, routes, and more. (8 minutes)
Semi-Static Pages (revised)
Episode #117 – Sep 02, 2012 – 70 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)
Polymorphic Association (revised)
Episode #154 – May 19, 2012 – 99 comments

Polymorphic Association (revised)

A polymorphic association allows a model to belong_to different types of other models. Here I show how to make a single comment model belong to articles, photos, and events. (11 minutes)
Simple OmniAuth (revised)
Episode #241 – Jun 02, 2012 – 91 comments

Simple OmniAuth (revised)

OmniAuth makes it easy to do user authentication through a third party provider such as Twitter or Facebook. Learn a simple approach in this episode. (11 minutes)
Sortable Lists (revised)
Episode #147 – Oct 13, 2011 – 131 comments

Sortable Lists (revised)

Here I show how to use jQuery UI to make a sortable list and a "sort" action to handle the updating. Top it off with acts_as_list to make it feature complete. (6 minutes)