public
Description: Various ways to handle multi-model forms in Rails.
Homepage:
Clone URL: git://github.com/ryanb/complex-form-examples.git
name age message
file .gitignore Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
file LICENSE Tue Oct 13 14:21:36 -0700 2009 updating readme [ryanb]
file README.rdoc Tue Oct 13 14:38:53 -0700 2009 Merge branch 'unobtrusive-jquery' into unobtrus... [ryanb]
file Rakefile Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory app/ Tue Oct 13 14:43:38 -0700 2009 fixing add/remove link behavior [ryanb]
directory config/ Mon Aug 03 17:51:03 -0700 2009 updating to Rails 2.3.3 [ryanb]
directory db/ Tue Aug 04 16:16:33 -0700 2009 adding solution for deeply nested models [ryanb]
directory doc/ Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory public/ Tue Oct 13 14:43:38 -0700 2009 fixing add/remove link behavior [ryanb]
directory script/ Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory test/ Tue Aug 04 16:16:33 -0700 2009 adding solution for deeply nested models [ryanb]
README.rdoc

Complex Form Example: Deep Nesting

This solution uses the accepts_nested_attributes_for which was introduced in Rails 2.3. It supports any level of depth in nesting models. This version uses unobtrusive JavaScript with jQuery and HTML 5.

Once you clone this repository, just run the migrations and start up the server to try it out.

  rake db:migrate
  script/server

Special thanks to Tim Riley and Eloy Duran.