How do I make a simple for boolean checkbox default to true?
assign_client
is a boolean field.
I tried these:
<%= f.input :assign_client, :label => 'Charge Client?', :true %>
<%= f.input :assign_client, :label => 'Charge Client?', :value => :true %>
<%= f.input :assign_client, :label => 'Charge Client?', :value => 1 %>
Thanks for the help!
I think you should add input_html
:
<%= f.input :assign_client, :label => 'Charge Client?', :input_html => { :checked => true }
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments