title: How to set boolean values to radio buttons in rails 4 form
body: <p>I am trying to set a true/false value to a radio button in a form in rails 4. I found a post on stackoverflow and implemented my radio buttons accordingly but I always get false as a value.</p>
  
  <p>my code</p>
  
  <pre><code>  &lt;div&gt;&lt;%= label :access_rights, 'Read Only', :value =&gt; "false" %&gt;&lt;/div&gt;
    &lt;%= f.radio_button :access_rights, "Read Only", :checked =&gt; true , false%&gt;&lt;/div&gt;
    &lt;div&gt;&lt;%= label :access_rights, 'Read and Write', :value =&gt; "true" %&gt;&lt;/div&gt;
    &lt;%= f.radio_button :access_rights, "Read and Write", true %&gt;
  </code></pre>
  
  <p>Is there a different way to set values for a radio button in rails 4?</p>
  
  <p>EDIT:</p>
  
  <p>in my controller </p>
  
  <pre><code>def access_params
    params.require(:accessor).permit(:email, :access_rights)
  end
  </code></pre>
  
  <p>Parameters:</p>
  
  <pre><code>{"utf8"=&gt;"✓",
   "authenticity_token"=&gt;"t/da2RRBi4KsyndnHx4WNZLoOHu9DVlAWtl/59NPiMc=",
   "accessor"=&gt;{"accessor_id"=&gt;"email",
   "access_rights"=&gt;"Read and Write"},
   "commit"=&gt;"Grant Permission"}
  </code></pre>