title: How do I set a default checked option with Rails collection_radio_buttons?
body: <p>So I'm trying to set the first radio button as checked by default for a form. I can't figure out how to do it. I can get all of the inputs to have <code>checked="checked"</code> by adding checked: true or checked: 'checked' in the html options, as in the following: </p>
  
  <pre><code>&lt;%= f.collection_radio_buttons :category_id, @categories, :id, :name, {}, { checked: true } %&gt;
  &lt;%= f.collection_radio_buttons :category_id, @categories, :id, :name, {}, { checked: 'checked' } %&gt;
  </code></pre>
  
  <p>I've tried specifying checked: <code>@category.first</code>, as in the following:</p>
  
  <pre><code>&lt;%= f.collection_radio_buttons :category_id, @categories, :id, :name, {}, { checked: @category.first } %&gt;
  </code></pre>
  
  <p>But that doesn't work either. None of the inputs are checked. </p>
  
  <p>Any ideas?</p>