I am a newbie, I want to know how to set the value for the check_box from '1' to 'Yes' and '0' to 'NO' in front end of ruby on rails?
<%= f.check_box :RDSAP_Answer, id: "enr_rds_surv_rdsap_xref_answer_check" %>
Now, in the browser, If I check the box it's store the value '1' to the database and if unchecked it's store the null value in the database.
I want to store Yes for checked and No for unchecked in the database. Is it possible to do in RoR? or is it easiest in JavaScript? What is the easiest way to set the value. Thanks in advance!