title: Syntax for form_for when building an array from checkboxes
body: <p>I'm making a form for an Order object, and the order has many Products, via a join table called OrderProducts.  So, we've got something like this:</p>
  
  <pre><code>&lt;% @order = Order.new %&gt;
  &lt;% form_for @order do |f| %&gt;
    &lt;% @products.each do |product| %&gt;
      ... want to iterate over products here to build up "order[product_ids][]", with one checkbox per product
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Usually for each product i would have a check_box_tag, saying </p>
  
  <pre><code>&lt;%= check_box_tag "order[product_ids][]", product.id, @order.product_ids.include?(product.id) %&gt;
  </code></pre>
  
  <p>But this, while working fine, always feels like a bit of a cop out.  Is there a way i can do it with the <code>f.check_box</code> syntax?  Important note - on the project in question I'm working in Rails 2.2.2, so a solution that works in rails 2 would be ideal.</p>