RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model x
Tracking Attribute Changes
Episode #109May 21, 200847 comments

Tracking Attribute Changes

Rails 2.1 keeps track of the changes you make to a model's attributes. It also allows you to see what the previous value was. But watch out for the gotcha! See this episode for details. (7 minutes)
Integrating Active Merchant
Episode #145Jan 19, 200991 comments

Integrating Active Merchant

In this episode I show how to add Active Merchant's functionality to a Rails application to make a fully-functional checkout process. (18 minutes)
scope_out
Episode #76Oct 22, 200732 comments

scope_out

The scope_out plugin will generate several helpful find methods for you automatically! It's the best way to move the find conditions into your model. Watch this episode for details. (6 minutes)
Simple Search Form
Episode #37May 28, 2007134 comments

Simple Search Form

A search form is quite different than other forms, this is because it does not deal with model's attributes. See a good way to add a simple search form in this episode. (6 minutes)
Semi-Static Pages
Episode #117Jul 07, 200873 comments

Semi-Static Pages

Static pages can sometimes be a little awkward to add to a Rails app. See a couple different solutions to this problem in this episode. (14 minutes)
5 View Tips
Episode #100Apr 07, 200880 comments

5 View Tips

Here's five quick tips to use in views. Be sure to catch the end of the episode where I reveal an exciting contest! (9 minutes)
Hackers Love Mass Assignment
Episode #26May 02, 200767 comments

Hackers Love Mass Assignment

Your site may be at risk! When using mass assignment, you are giving the user complete control over that model and its associations. See how a hacker might use this vulnerability and learn how to stop it in this episode. (6 minutes)
Conditional Validations
Episode #41Jun 06, 200756 comments

Conditional Validations

By default, validations will take place every time the model is saved. Sometimes you only want a validation to happen when certain conditions are met. See how to do that in this episode. (4 minutes)
Virtual Attributes
Episode #16Apr 09, 200765 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)
Refactoring User Name Part 1
Episode #10Mar 26, 200736 comments

Refactoring User Name Part 1

Learn how to clean up your code through refactoring. This episode will show you how to move code from the view into the model to remove duplication and simplify the view. (5 minutes)