<%= f.check_box:TYPE %> AB <br><br>
I have used the above mentioned in my code and when i click submit it takes 1 if checked and 0 if not checkedand it is stored in db. How can i store a string like AB if checked and nil if not checked and i want to store that string in db instead of 0 and 1?
This is the definition of this helper method:
So I supose you need something like:
But in your rails application you get string
'AB'and string'nil', that how it works.