RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model xFree Episodes xViews x
Nested Model Form Part 1
Episode #196Jan 11, 2010184 comments

Nested Model Form Part 1

Handling multiple models in a single form is much easier with the accepts_nested_attributes_for method. See how to use this method to handle nested model fields. (11 minutes)
Nested Model Form Part 2
Episode #197Jan 18, 2010215 comments

Nested Model Form Part 2

Add and remove nested model fields dynamically through JavaScript using either Prototype or jQuery. (12 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)
Model Name in URL
Episode #63Jul 27, 200760 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)
Validations in Rails 3
Episode #211Apr 26, 201059 comments

Validations in Rails 3

Rails 3 offers several new additions to validations. Here learn how to make a custom error_messages partial, reflect on validations, and clean up complex validations in a model. (9 minutes)
Complex Forms Part 1
Episode #73Oct 01, 2007171 comments

Complex Forms Part 1

Complex forms often lead to complex controllers, but that doesn't have to be the case. In this episode see how you can create multiple models through a single form while keeping the controller clean. (8 minutes)
Create Model Through Text Field
Episode #57Jul 13, 200759 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)
Complex Forms Part 3
Episode #75Oct 15, 2007270 comments

Complex Forms Part 3

In this third and final episode on complex forms I will show you how to edit a project and multiple tasks all in one form. This includes removing and adding tasks dynamically as well. See the show notes for updated code. (16 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)
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)