dimanche 5 juillet 2015

Rails updating boolean values in DB without submitting form

Currently i am updating the known column which is a boolean for notes table by the following code

<%= f.check_box :known, {}, "true", "false" %> 

But i want to update it without submitting the form like checking the checkbox should instantly change the value to true in db.

Is there any way to do it?




Aucun commentaire:

Enregistrer un commentaire