RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: forms xRevised Episodes x
Nested Model Form (revised)
Episode #196Apr 19, 2012228 comments

Nested Model Form (revised)

Handling multiple models in a single form is easy with accepts_nested_attributes_for. Here you will also learn how to add and remove nested records through JavaScript. (11 minutes)
Advanced Search Form (revised)
Episode #111Nov 17, 201161 comments

Advanced Search Form (revised)

It is often best to use a GET request when submitting a search form, however if it is an advanced search form with a lot of fields then this may not be ideal. Here I show how to create a search resource to handle this. (6 minutes)
Time Zones (revised)
Episode #106Oct 28, 201293 comments

Time Zones (revised)

Active Support makes it easy to work with time zones. Learn how to add a Time Zone select field to a user form and watch out for the gotchas. (7 minutes)
SimpleForm (revised)
Episode #234Mar 03, 201262 comments

SimpleForm (revised)

Easily generate complex forms with SimpleForm. Here I show how to convert bulky markup into a concise list of fields, customize it by passing options, and add error handling. (9 minutes)
HABTM Checkboxes (revised)
Episode #17Dec 22, 201194 comments

HABTM Checkboxes (revised)

A many-to-many association can be edited through check boxes in a form. Here I show how to do this with a has_many through association complete with clickable labels. (6 minutes)
Edit Multiple (revised)
Episode #165Feb 25, 2013105 comments

Edit Multiple (revised)

Editing one record at a time can be tedious work. Here you will learn three different ways to edit multiple records at once using checkboxes. (15 minutes)
Virtual Attributes (revised)
Episode #16Jul 20, 201271 comments

Virtual Attributes (revised)

Virtual attributes are a clean way to add form fields that do not map directly to the database. Here I show how to handle validations, associations, and more. (11 minutes)
jQuery & Ajax (revised)
Episode #136Sep 28, 2012146 comments

jQuery & Ajax (revised)

Here I go back to the basics and show how to turn a traditional Rails app into one that interacts through Ajax by adding "remote" options, JavaScript templates and a dabble of jQuery. (14 minutes)
Sending Email (revised)
Episode #61Apr 28, 201271 comments

Sending Email (revised)

Thanks to Action Mailer, sending email in Rails is easy but there are several gotchas to be aware of. Here I show how to send an email upon submitting a form and the configuration options necessary. (8 minutes)
Polymorphic Association (revised)
Episode #154May 19, 201299 comments

Polymorphic Association (revised)

A polymorphic association allows a model to belong_to different types of other models. Here I show how to make a single comment model belong to articles, photos, and events. (11 minutes)