Forms containing checkboxes and collections/object lists

Check out this railscast.

http://railscasts.com/episodes/17