How can I make a check box default to being \"checked\" when it is initially displayed?
I\'ve not found a \"Rails\" way to do this (that works) so I did it with JavaScr
I did it in that way.
Add hidden field with value 0 ABOVE check_box_tag
<%= hidden_field_tag :subscribe, '0' %> <%= check_box_tag :subscribe, '1', params[:subscribe] != '0' %>
On server check with != '0'
!= '0'
subscribe = params[:subscribe] != '0'