title: How to add class to Rails select form helper when using as a block
body: <p>The documentation for Rails select form helper states (<a href="http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/select" rel="noreferrer">see documentation</a>):</p>
  
  <pre><code>select(object, method, choices = nil, options = {}, html_options = {}, &amp;block)
  </code></pre>
  
  <p>Which allows adding a class simple, like so:</p>
  
  <pre><code>&lt;%= f.select :some_attr, MYOPTIONS, {}, {class: 'my-class'} %&gt;
  </code></pre>
  
  <p>My question is, how do I add a class to it when using it as a block? Rails documentation states:</p>
  
  <pre><code>select(report, "campaign_ids") do
    available_campaigns.each do |c|
      content_tag(:option, c.name, value: c.id, data: { tags: c.tags.to_json })
    end
  end
  </code></pre>
  
  <p>It doesn't work when I use it like so:</p>
  
  <pre><code>&lt;%= f.select :some_attr, {}, {class: 'my-class'} do %&gt;
    &lt;% MYOPTIONS.each do |MYOPTION| do %&gt;
      &lt;%= content_tag :option, MYOPTION.label, value: MYOPTION.value %&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Nor does it work if I use:</p>
  
  <pre><code>f.select :some_attr, class: 'my-class' do
  </code></pre>
  
  <p>The class is not applied to the select tag in the HTML.</p>