Forum: Ruby on Rails Form Array Elements Handling

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris B. (Guest)
on 2006-03-10 20: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.


This topic is locked and can not be replied to.