I am creating a login system and would have a remember me checkbox. I would like to make this checkbox default to checked so that the user can uncheck if they do NOT want to be remembered.
Currently I have
<%= label_tag :remember_me %>
<%= check_box_tag :remember_me, 1, params[:remember_me] %>
How do I add the option to default this to checked?
This seems like it should be simple, but I've tried looking at the api and monkeying with my code to make it work, but no luck! Any help would be greatly appreciated.
This should work.
<%= check_box_tag :remember_me, :checked => true %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With