Sign in through GitHub
Counter Cache Column
Episode #23Apr 25, 200744 comments

Counter Cache Column

If you need to display the record count for a has_many association, you can improve performance by caching that number in a column. (7 minutes)
Eager Loading
Episode #22Apr 23, 200729 comments

Eager Loading

One way to improve performance is to cut down on the number of SQL queries. You can do this through eager loading. Learn all about it in this episode! (4 minutes)
Super Simple Authentication
Episode #21Apr 20, 200749 comments

Super Simple Authentication

The final piece of the administration puzzle: authentication. There are many different approaches which is why I saved this step for last. This episode will cover a few techniques including the simple solution used for this site. (6 minutes)
Restricting Access
Episode #20Apr 18, 200722 comments

Restricting Access

In this second part of the series on administration, you will learn how to lock down the site to keep the public from accessing the administration features. (4 minutes)
Where Administration Goes
Episode #19Apr 16, 200725 comments

Where Administration Goes

This is the first part of a three part series on building an administration system. Many developers choose to separate it completely from the public side of the site by placing it into an admin subdirectory. This episode will show you an alternative and often better solution. (5 minutes)
Looping Through Flash
Episode #18Apr 13, 20079 comments

Looping Through Flash

Displaying flash messages in the layout can be a pain at times. In this episode you will learn an easy way to display any kind of flash message by looping through the hash. (1 minute)
HABTM Checkboxes
Episode #17Apr 11, 200781 comments

HABTM Checkboxes

It is often asked: how do I create a list of checkboxes for managing a HABTM association? Ask no more because this episode will show you how to do exactly that. (6 minutes)
Virtual Attributes
Episode #16Apr 09, 200734 comments

Virtual Attributes

Keep your controllers clean and forms flexible by adding virtual attributes to your model. This very powerful technique allows you to create form fields which may not directly relate to the database. (3 minutes)
Fun with Find Conditions
Episode #15Apr 06, 20079 comments

Fun with Find Conditions

You can pass more than simple strings to find conditions. Arrays, ranges, and nil values can be passed as well. In this episode you will see the tricks involved with passing these odd objects to find conditions. (Update: audio fixed). (4 minutes)
Performing Calculations on Models
Episode #14Apr 04, 20073 comments

Performing Calculations on Models

Did you know ActiveRecord provides class methods for performing calculations on models? You can even use these methods through associations. (2 minutes)