RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails xActive Record x
Model Caching (revised)
Episode #115 – May 13, 2013 – 426 comments

Model Caching (revised)

Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record. (12 minutes)
Tagging
Episode #382 – Sep 22, 2012 – 125 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)
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)
Validations in Rails 3
Episode #211 – Apr 26, 2010 – 59 comments

Validations in Rails 3

Rails 3 offers several new additions to validations. Here learn how to make a custom error_messages partial, reflect on validations, and clean up complex validations in a model. (9 minutes)
Migrating to PostgreSQL
Episode #342 – Apr 17, 2012 – 137 comments

Migrating to PostgreSQL

Postgres is a feature-packed relational database that every Rails developer should consider using. Here you will learn how to install it, add it to a new application, and transition from an existing SQLite app using the "taps" gem. (8 minutes)
Eager Loading (revised)
Episode #22 – Mar 20, 2013 – 223 comments

Eager Loading (revised)

One way to improve performance is to reduce the number of database queries through eager loading. Here I demonstrate this and compare the difference between the "includes" and "joins" methods. (7 minutes)
Active Record Queries in Rails 3
Episode #202 – Feb 22, 2010 – 71 comments

Active Record Queries in Rails 3

Rails 3 introduces a new query interface for performing finds in Active Record. See how it works along with the changes in named scopes. (10 minutes)
Globalize3
Episode #338 – Apr 04, 2012 – 67 comments

Globalize3

Rails has great internationalization (I18n) support making it easy to translate static text into other languages, but how do we translate database content? Learn how using Globalize 3 in this episode. (5 minutes)
Public Activity
Episode #406 – Feb 13, 2013 – 155 comments

Public Activity

Learn how to easily add a user activity feed using the public_activity gem. Here I show both the default setup using model callbacks and a manual way to trigger activities. (10 minutes)
Hackers Love Mass Assignment (revised)
Episode #26 – Mar 08, 2012 – 66 comments

Hackers Love Mass Assignment (revised)

One of the most common security issues in a Rails application is the mass-assignment vulnerability which allows a user to set any attribute on the model. Learn how to prevent it in this episode. (6 minutes)