RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model x
Dynamic Forms
Episode #403Jan 27, 2013120 comments

Dynamic Forms

Learn how to add fields to a form dynamically using another form, complete with custom field types. It's fieldception! (14 minutes)
Facebook Authentication
Episode #360Jun 25, 2012196 comments

Facebook Authentication

This will show how to create a new facebook application and configure it. Then add some authentication with the omniauth-facebook gem and top it off with a client-side authentication using the JavaScript SDK. (12 minutes)
Hackers Love Mass Assignment (revised)
Episode #26Mar 08, 201266 comments

Hackers Love Mass Assignment (revised)

One of the most common security issues in a Rails application is the mass-assignment vulnerability which allows a user to set any attribute on the model. Learn how to prevent it in this episode. (6 minutes)
What's New in Rails 4
Episode #400Jan 04, 2013115 comments

What's New in Rails 4

Rails 4.0 is still unfinished, but it is shaping up to become a great release. Here I show how to setup a new Rails 4.0 (edge) application and walk through many of its new features. (20 minutes)
Model Versioning
Episode #177Aug 31, 200956 comments

Model Versioning

If you need to keep track of a model's history of changes and switch between versions, consider using the vestal_versions gem like I show in this episode. (9 minutes)
Pretty URLs with FriendlyId
Episode #314Jan 09, 201299 comments

Pretty URLs with FriendlyId

If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history. (7 minutes)
Tagging
Episode #382Sep 22, 2012125 comments

Tagging

There are several gems to help implement tags in a Rails app. Here I show you how to integrate acts-as-taggable-on and then show how to do it from scratch. (11 minutes)
MiniTest with Rails
Episode #327Feb 21, 201277 comments

MiniTest with Rails

MiniTest is a fast and lightweight testing library. Here you will learn how to use it in a Rails app for model, helper, and integration testing. The Turn gem is also demonstrated for prettier test output. (15 minutes)
Site-Wide Announcements (revised)
Episode #103Nov 12, 201295 comments

Site-Wide Announcements (revised)

Here I show how to add an announcement message at the top of every page in the application and allow the user to permanently hide it. This is all done test-first and even includes testing the JavaScript behavior. (11 minutes)
How I Test
Episode #275Jul 18, 2011137 comments

How I Test

Here I show how I would add tests to the password reset feature created in the previous episode. I use RSpec, Capybara, Factory Girl, and Guard to make request, model, and mailer specs. (15 minutes)