Forum: Ruby on Rails Form Array Elements Handling

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B29105598b6464efc13b04cb445efa85?d=identicon&s=25 Chris Bruce (Guest)
on 2006-03-10 19:29
(Received via mailing list)
What is the proper "Rails Way" to handle arrays of objects on a form
using checkboxes to select one or more?  For example, I would like to
assign one or more persons to task.  In my view, I loop through each
person, spitting out a checkbox.  When the form is submitted back to the
controller, I would like to iterate through the checked persons.

I know rails has some ways of dealing with object arrays in forms, but I
am not sure how to correctly use them.


Any help or links to samples is greatly appreciated.



Thanks,


Chris
This topic is locked and can not be replied to.