RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: migrations x
Facebook Authentication
Episode #360Jun 25, 2012196 comments

Facebook Authentication

This will show how to create a new facebook application and configure it. Then add some authentication with the omniauth-facebook gem and top it off with a client-side authentication using the JavaScript SDK. (12 minutes)
What's New in Rails 4
Episode #400Jan 04, 2013115 comments

What's New in Rails 4

Rails 4.0 is still unfinished, but it is shaping up to become a great release. Here I show how to setup a new Rails 4.0 (edge) application and walk through many of its new features. (20 minutes)
Optimistic Locking (revised)
Episode #59Aug 04, 2012135 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)
Multitenancy with Scopes
Episode #388Oct 20, 2012120 comments

Multitenancy with Scopes

A multi-tenant application can be difficult to implement because the data for each tenant must be completely separate. Here I show how to do this using subdomains and default scopes in Active Record. (12 minutes)
Tagging
Episode #382Sep 22, 2012125 comments

Tagging

There are several gems to help implement tags in a Rails app. Here I show you how to integrate acts-as-taggable-on and then show how to do it from scratch. (11 minutes)
Devise and OmniAuth (revised)
Episode #235Jul 13, 2012134 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 #63Dec 16, 201285 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)
Activity Feed from Scratch
Episode #407Feb 14, 2013101 comments

Activity Feed from Scratch

Creating an activity feed presents some interesting challenges. Here I share my thought process behind my implementation including when to use callbacks and a few tricks with partials. (14 minutes)
Time Zones (revised)
Episode #106Oct 28, 201293 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)
Backbone on Rails Part 1
Episode #323Feb 08, 2012207 comments

Backbone on Rails Part 1

In this first part of a two part series you will learn basic Backbone concepts including models, collections, routers, views and events. The backbone-on-rails gem is used for Rails integration with the asset pipeline. (18 minutes)