title: Style Rails collection_check_boxes
body: <p>I been trying to apply some CSS classes to collection_check_boxes but I can't get it to work. Right now I doing this: </p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;%= f.collection_check_boxes(:brand_ids, Brand.all, :id, :name) do |b| %&gt;
          &lt;%= b.label { b.check_box + b.text } %&gt;
      &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>which outputs this HTML:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="user_brand_ids_1"&gt;
          &lt;input id="user_brand_ids_1" name="user[brand_ids][]" type="checkbox" value="1"&gt;Brand 1
      &lt;/label&gt;
      &lt;input name="user[brand_ids][]" type="hidden" value=""&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Instead I would like to output this HTML:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="label-checkbox" for="user_brand_ids_1"&gt;
          &lt;input id="user_brand_ids_1" name="user[brand_ids][]" type="checkbox" value="1"&gt;
          &lt;span class="custom-checkbox"&gt;&lt;/span&gt;Brand 1
      &lt;/label&gt;
      &lt;input name="user[brand_ids][]" type="hidden" value=""&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried the following, which doesn't work...</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;%= f.collection_check_boxes(:brand_ids, Brand.all, :id, :name, {}, {class: 'label-checkbox'}) do |b| %&gt;
          &lt;%= b.label { b.check_box + b.text }, class: 'label-checkbox' %&gt;
      &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Any ideas on how could I do this?</p>