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:21:36 -0700 2009 updating readme [ryanb]
file Rakefile Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory app/ Tue Oct 13 14:21:36 -0700 2009 using helper methods when generating nested fie... [ryanb]
directory config/ Mon Aug 03 17:51:03 -0700 2009 updating to Rails 2.3.3 [ryanb]
directory db/ Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory doc/ Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory public/ Tue Oct 13 14:21:37 -0700 2009 ensuring add/remove link behavior only applies ... [ryanb]
directory script/ Fri Jul 18 14:10:24 -0700 2008 initial import [ryanb]
directory test/ Mon Aug 03 17:51:03 -0700 2009 updating to Rails 2.3.3 [ryanb]
README.rdoc

Complex Form Examples

A simple solution for the multi-model form problem using the latest accepts_nested_attributes_for available in Rails 2.3. 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

See the branches for alternative solutions. Here’s how to clone a remote branch.

  git checkout -b deep origin/deep

Special thanks to Tim Riley and Eloy Duran.