RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: migrations xActive Record x
Active Record Reputation System
Episode #364 – Jul 09, 2012 – 105 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)
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)
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)
Seed Data
Episode #179 – Sep 14, 2009 – 64 comments

Seed Data

Rails 2.3.4 includes a conventional way to add seed data to your application - no more including it in the migration files. (7 minutes)
Nested Model Form Part 1
Episode #196 – Jan 11, 2010 – 184 comments

Nested Model Form Part 1

Handling multiple models in a single form is much easier with the accepts_nested_attributes_for method. See how to use this method to handle nested model fields. (11 minutes)
Embedded Association
Episode #189 – Nov 23, 2009 – 83 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)
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)
Tableless Model
Episode #193 – Dec 21, 2009 – 55 comments

Tableless Model

If you want to create a model without a database backend, you simply need to define a couple methods in the model like I show in this episode. (8 minutes)
Model Versioning
Episode #177 – Aug 31, 2009 – 56 comments

Model Versioning

If you need to keep track of a model's history of changes and switch between versions, consider using the vestal_versions gem like I show in this episode. (9 minutes)
Polymorphic Association
Episode #154 – Mar 23, 2009 – 125 comments

Polymorphic Association

Polymorphic associations can be perplexing. In this episode I show you how to set it up in Active Record and then move to the controller and view layer. (8 minutes)