RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model xViews x
Nested Model Form (revised)
Episode #196 – Apr 19, 2012 – 228 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 #196 – Jan 11, 2010 – 184 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 #197 – Jan 18, 2010 – 215 comments

Nested Model Form Part 2

Add and remove nested model fields dynamically through JavaScript using either Prototype or jQuery. (12 minutes)
Charts & Graphs (revised)
Episode #223 – Sep 15, 2012 – 116 comments

Charts & Graphs (revised)

If you have a lot of data, consider adding a graph to provide an overview of it. Here I show how to use Morris.js to chart an Order model and visualize trends in the data. (12 minutes)
Ember Part 2
Episode #410 – Mar 12, 2013 – 140 comments

Ember Part 2

Here we continue our look into Ember.js. First we add a JSON API to persist the entries through ember-data. Then we finish up the project by adding a computed property and a view object. (14 minutes)
Dynamic Forms
Episode #403 – Jan 27, 2013 – 120 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)
Tagging
Episode #382 – Sep 22, 2012 – 125 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)
Advanced Search Form (revised)
Episode #111 – Nov 17, 2011 – 61 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)
Model Name in URL
Episode #63 – Jul 27, 2007 – 60 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 #211 – Apr 26, 2010 – 59 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)