I have a form that is an update user form where several of the elements are checkboxes. I want true to pass to the params if checked (this is working) and false to pass to the
Look at it
The main idea to place hidden field before checkbox. When a form is submitted fields will be parsed: if checkbox is checked - its value will be passed, else the value of hidden field
For example smth like this (NOT testes)
<%= hidden_field_tag :basketball, false %>
<%= check_box_tag :basketball, checked = true %> Basketball