RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model x
Tracking Attribute Changes
Episode #109 – May 21, 2008 – 47 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 #145 – Jan 19, 2009 – 91 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 #76 – Oct 22, 2007 – 32 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 #37 – May 28, 2007 – 134 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 #117 – Jul 07, 2008 – 73 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 #100 – Apr 07, 2008 – 80 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 #26 – May 02, 2007 – 67 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 #41 – Jun 06, 2007 – 56 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 #16 – Apr 09, 2007 – 65 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 #10 – Mar 26, 2007 – 36 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)