title: Rails, collection_check_boxes, maximum picked
body: <p>I have a form which uses collection_check_boxes for an input.</p>
  
  <pre><code>= f.collection_check_boxes :color_ids, group.colors, :id, :name
  </code></pre>
  
  <p>I would like to prevent users from checking more than n boxes in the form. </p>
  
  <p>I know how to do it in the model, I just need the views part. Thanks!</p>