RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: select xActive Record x
Eager Loading (revised)
Episode #22Mar 20, 2013223 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)
Full-Text Search in PostgreSQL
Episode #343Apr 17, 2012131 comments

Full-Text Search in PostgreSQL

Postgres offers full-text searching right out of the box. This episode shows how to write queries from scratch, apply tools like Texticle and pg_search, and optimize performance through indexes. (16 minutes)
Migrating to PostgreSQL
Episode #342Apr 17, 2012137 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)
Active Record Reputation System
Episode #364Jul 09, 2012105 comments

Active Record Reputation System

If you need to calculate an average user's rating or sum up a number of votes, consider using the activerecord-reputation-system gem. Here I will cover the basics and also briefly present a from-scratch solution. (10 minutes)
Virtual Attributes (revised)
Episode #16Jul 20, 201271 comments

Virtual Attributes (revised)

Virtual attributes are a clean way to add form fields that do not map directly to the database. Here I show how to handle validations, associations, and more. (11 minutes)
Embedded Association
Episode #189Nov 23, 200983 comments

Embedded Association

Learn how to set up a one-to-many or many-to-many association which is entirely embedded into a single column through a string or bitmask. (14 minutes)
Include vs Joins
Episode #181Sep 28, 200973 comments

Include vs Joins

The :include and :joins options for the find method can be a little confusing because they are so similar. In this episode I show specifically when to use which option. (11 minutes)
Searchlogic
Episode #176Aug 24, 200996 comments

Searchlogic

Searchlogic makes searching models easier than ever with its assortment of named scopes. In this episode I show you how to create simple and advanced searches. (13 minutes)
Tree Based Navigation
Episode #162May 18, 200970 comments

Tree Based Navigation

The acts_as_tree plugin provides many methods for handling a tree based association. In this episode I show how to build a navigation system with tabs, subpages, and breadcrumbs. (11 minutes)
Integrating Active Merchant
Episode #145Jan 19, 200991 comments

Integrating Active Merchant

In this episode I show how to add Active Merchant's functionality to a Rails application to make a fully-functional checkout process. (18 minutes)