RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: validations x
Customize Field Error
Episode #39Jun 01, 200745 comments

Customize Field Error

When a validation error occurs, Rails helpfully wraps the field in a div tag so you can style it. But sometimes you don't want this behavior. In this episode you will see how to customize it. (3 minutes)
Testing Controllers with RSpec
Episode #71Sep 17, 200759 comments

Testing Controllers with RSpec

Controllers are tricky to test, and there's no perfect way to do it. In this episode you will see how I test controllers, and my reasoning behind it. (11 minutes)
Making a Plugin
Episode #33May 18, 200759 comments

Making a Plugin

You can sometimes remove a lot of duplication by generating methods dynamic. In this episode I will show you how to create a plugin which does exactly that. (7 minutes)
with_options
Episode #42Jun 08, 200736 comments

with_options

Several methods in rails take a hash of options as the last argument. If you are passing the same options to several methods, you can remove this duplication by using with_options. Learn all about it in this episode. (3 minutes)
Time in Text Field
Episode #32May 16, 200748 comments

Time in Text Field

Although Rails does allow you to edit time attributes with text fields, it's not very flexible. In this episode you will learn how to use a virtual attribute to format the time to your liking. (5 minutes)