title: How can I create an array of objects from a list of associated checkboxes?
body: <p>First of all, I've done a fair amount of looking around, and while questions get around answers, I have a problem I think is somewhat unique. I have a list of checkboxes generated with the following code: </p>
  
  <pre><code>&lt;% for student in Student.find(:all) %&gt;
      &lt;div&gt;
      &lt;%= check_box_tag "user[student_ids][]", student.id, current_user.students.include    (student) %&gt;
      &lt;%= student.name %&gt;
      &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>After clicking the 'update' button at the bottom, I need each of the checked boxes to be placed into an array. I then plan on iterating over the array and doing some work on each of the checked names. I am having a hard time, however, with the process of getting these names all into an array. I really am not sure which of the standard web actions this kind of work should be (i.e, post, get, etc.), so I don't know how to set up a route. Even if I could set up a route to a controller, how would I get the checked students into an array of Student objects?</p>
  
  <p>Thanks ahead of time for your help!</p>