How do i tell the check_box method to NOT add a hidden check_box for the 'unchecked' value?
In Rails 4 you can use include_hidden: false
example f.check_box :some_field, include_hidden: false
Since Rails 3.2, the hidden field will not be shown if the unchecked_value
argument evaluates to false
.
Example: f.check_box :your_field, {}, checked_value, false
See the Rails source: 3.2, 4.1
use <%= check_box_tag "your_model[your_field]" %>
f.check_box
always gives you a hidden field.