RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: nested 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)
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)
Tree-Based Navigation (revised)
Episode #162Dec 01, 201293 comments

Tree-Based Navigation (revised)

If your Rails app is content-heavy, consider organizing it in a tree menu structure. Here I show how to add top-level tabs, nested links in a side bar, and breadcrumbs to go up the hierarchy. (10 minutes)
Model Name in URL (revised)
Episode #63Dec 16, 201285 comments

Model Name in URL (revised)

A model's ID in the URL is not very helpful to the user. Consider adding the name which can also improve SEO. Learn how to override to_param, add a slug attribute, and make a catch all route for deep nesting. (9 minutes)
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)
Trees with Ancestry
Episode #262Apr 18, 201184 comments

Trees with Ancestry

The Ancestry gem works like a tree but also allows us to fetch deeply nested messages in a single query. It provides a method to arrange them after fetching. (9 minutes)
Nested Resources
Episode #139Dec 08, 200866 comments

Nested Resources

In this episode I show how to nest resources through routing and go into some new additions in Rails 2.2. (10 minutes)
Subdomains (revised)
Episode #123Jan 13, 201266 comments

Subdomains (revised)

In Rails 3.1 subdomains are easier than ever to use. Here I show how to route a subdomain to a specific controller action, generate links, nest resources, and more. (7 minutes)
Ransack
Episode #370Aug 03, 201293 comments

Ransack

Ransack allows you to easily build complex search forms. It also helps in adding sortable links and building a dynamic advanced search page. (10 minutes)