RailsCasts Pro episodes are now free!

Learn more or hide this

Stopping Spam with Akismet
Episode #65 – Aug 06, 2007 – 58 comments

Stopping Spam with Akismet

The Railscasts site has been getting a lot of comment spam in the past, but no longer. In this episode I will show you how I solved this problem by using the Akismet web service. (11 minutes)
Custom Helper Modules
Episode #64 – Jul 30, 2007 – 47 comments

Custom Helper Modules

Rails designates one helper module per controller, but that shouldn't stop you from making custom helper modules to help structure the code. Learn how in this episode. (5 minutes)
Model Name in URL
Episode #63 – Jul 27, 2007 – 60 comments

Model Name in URL

By default, Rails uses the model's id in the URL. What if you want to use the name of the model instead? You can change this behavior by overriding the to_param method in the model. Watch this episode for details. (6 minutes)
Hacking ActiveRecord
Episode #62 – Jul 25, 2007 – 46 comments

Hacking ActiveRecord

Have you ever wanted to temporarily disable all validations? Well, ActiveRecord doesn't support this, but that doesn't mean we can't add it. This episode will show you how to open up an existing class and change its behavior. (11 minutes)
Sending Email
Episode #61 – Jul 23, 2007 – 67 comments

Sending Email

This is a brief guide to sending email in Rails. See how to configure the environment, generate a mailer, create a template, and deliver the mail. (7 minutes)
Testing without Fixtures
Episode #60 – Jul 20, 2007 – 49 comments

Testing without Fixtures

Tests which rely heavily on fixtures are brittle and can be difficult to maintain. This episode will show a couple techniques for creating tests which don't use fixtures. (9 minutes)
Optimistic Locking
Episode #59 – Jul 18, 2007 – 35 comments

Optimistic Locking

When two people attempt to update the same record near the same time, one of the updates will likely be overwritten. You can solve this problem with optimistic locking. (7 minutes)
How to Make a Generator
Episode #58 – Jul 16, 2007 – 39 comments

How to Make a Generator

Rails comes with many built-in generators, but what if you want to customize them or make your own? Rails gives you a great way to do this which you will learn in this episode. (11 minutes)
Create Model Through Text Field
Episode #57 – Jul 13, 2007 – 59 comments

Create Model Through Text Field

Let's say you provide a select menu for setting which category a given product belongs to, but you also want the option of creating a new category by typing the name in a text field. See a great way to do that in this episode. (5 minutes)
The Logger
Episode #56 – Jul 11, 2007 – 32 comments

The Logger

Learn all about the logger in this episode. See how to send messages to the log and how to customize it. (9 minutes)