title: Rails Form Select Required
body: <p>I am trying to have a <code>&lt;select&gt;</code> be required in my Rails form.</p>
  
  <p>This is my code (elipsis is to make line shorter):</p>
  
  <pre><code>&lt;div class="field"&gt;
    &lt;p&gt;&lt;%= f.label :category, "Category:" %&gt;&lt;/p&gt;
    &lt;%= f.select :category, ['Analytics','Commerce',..., 'Web'], :prompt =&gt; '-- Select One --', :required =&gt; true %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Which outputs</p>
  
  <pre><code>&lt;div class="field"&gt;
    &lt;p&gt;&lt;label for="startup_category"&gt;Category:&lt;/label&gt;&lt;/p&gt;
    &lt;select id="startup_category" name="startup[category]"&gt;
      &lt;option value=""&gt;-- Select One --&lt;/option&gt;
      &lt;option value="Analytics"&gt;Analytics&lt;/option&gt;
      &lt;option value="Commerce"&gt;Commerce&lt;/option&gt;
      &lt;option value="Content Management"&gt;Content Management&lt;/option&gt;
      &lt;option value="Gaming"&gt;Gaming&lt;/option&gt;
      &lt;option value="Green"&gt;Green&lt;/option&gt;
      &lt;option value="Media"&gt;Media&lt;/option&gt;
      &lt;option value="Social Media"&gt;Social Media&lt;/option&gt;
      &lt;option value="Technology - Software"&gt;Technology - Software&lt;/option&gt;
      &lt;option value="Technology - Hardware"&gt;Technology - Hardware&lt;/option&gt;
      &lt;option value="Web"&gt;Web&lt;/option&gt;&lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Putting <code>{:required =&gt; true}</code> instead of <code>:required =&gt; true</code> gives a syntax error and <code>{:prompt =&gt; '-- Select One --', :required =&gt; true}</code> renders the page, but without the <code>required="true"</code> in my select tag.</p>
  
  <p>How can I get <code>required="true"</code> in my tag?</p>