RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails 3 xActive Record x
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)
ActiveRecord::Relation Walkthrough
Episode #239 – Nov 07, 2010 – 42 comments

ActiveRecord::Relation Walkthrough

The new Active Record query methods in Rails 3 might seem like magic at first. But in this episode I unravel how it works by browsing the Rails 3 source code. (11 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)
Advanced Queries in Rails 3
Episode #215 – May 24, 2010 – 53 comments

Advanced Queries in Rails 3

Learn some advanced techniques regarding named scopes and get an introduction to Arel in this episode. (9 minutes)
Hacking with Arel
Episode #355 – May 30, 2012 – 70 comments

Hacking with Arel

Here I show a variety of ways to rewrite a long SQL query using only Active Record and Arel. This includes generating scopes dynamically, adding an "or" operator, and adding a powerful "match" method. (15 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)
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)
7 Security Tips
Episode #178 – Sep 07, 2009 – 64 comments

7 Security Tips

Security is important! Here I show seven different security flaws which are common to Rails applications ranging from mass assignment to CSRF protection. (14 minutes)
Rails 2.2 Extras
Episode #140 – Dec 15, 2008 – 45 comments

Rails 2.2 Extras

This episode finishes up the Rails 2.2 series by showing a few miscellaneous additions that I find useful. (4 minutes)
Rails 2.3 Extras
Episode #152 – Mar 09, 2009 – 55 comments

Rails 2.3 Extras

This episode finishes up this series on Rails 2.3. Here you will learn about several smaller additions in 2.3. (9 minutes)