RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: forms xActive Record 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)
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)
Multistep Forms
Episode #217Jun 07, 201092 comments

Multistep Forms

See how to create a multi-step (wizard) form from scratch in this episode. (15 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)
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)
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)
MetaWhere & MetaSearch
Episode #251Jan 31, 201165 comments

MetaWhere & MetaSearch

MetaWhere provides a way to do complex find conditions without SQL in Active Record. MetaSearch makes it easy to create search forms with many find options. (8 minutes)
Thinking Sphinx (revised)
Episode #120Dec 09, 201144 comments

Thinking Sphinx (revised)

Sphinx is a full-text search engine for use with MySQL or PostgreSQL. Learn how to add Thinking Sphinx by defining an index on your model and searching with various options. (10 minutes)
Advanced Search Form
Episode #111May 26, 2008105 comments

Advanced Search Form

If you need to create an advanced search with a lot of fields, it may not be ideal to use a GET request as I showed in episode 37. In this episode I will show you how to handle this by creating a Search resource. (7 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)