Desired Setting: I am trying to set the default option for this form to be "No" (or false), however, when I set it as such, my application loads with no option selected.
When I use :check => true
, the default option selected becomes "Yes" (or true). I attempted to switch it to false and move it to the No option, but it did not work as expected.
Snippet of Code:
<div class="form-group">
<%= label(:store_item, :can_be_shipped, 'Can be Shipped?')%>
<div class="form-inline">
<div class="radio inline">
<%= radio_button(:store_item, :can_be_shipped, true)%>
<%= label(:store_item, :can_be_shipped, 'Yes', :value => true)%>
</div>
<div class="radio inline">
<%= radio_button(:store_item, :can_be_shipped, false)%>
<%= label(:store_item, :can_be_shipped, 'No', :value => false, :checked => false)%>
</div>
</div>
</div
What am I missing in order to have the default option checked as "No" (false)?
Your assistance is appreciated.