I have in a form (form_tag) several checkboxes like this:
<%=check_box_tag 'model_name[column_name]', 1, (@data.model_name.column_name == 1 ? true : false)%>
And updating them like:
variable = ModelName.find(params[:id])
variable.update_attributes(params[:model_name])
This works only in a moment, when I check some checkboxes - send them and they will be saved. That's fine. But when I uncheck all checkboxes - send form - so nothing happend, in the DB table will not set the value 0 in the columns...
Could you give me any tip, how to fix it?
Thank you in advance