active-record episodes
#217
Jun 07, 2010
53 comments
Multistep Forms
See how to create a multistep (wizard) form from scratch in this episode.
Advanced Queries in Rails 3
Learn some advanced techniques regarding named scopes and get an introduction to Arel in this episode.
Refactoring & Dynamic Delegator
Learn how to refactor a set of conditional Active Record queries using a Dynamic Delegator.
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.
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.
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.
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.
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.
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.
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.






