lundi 21 septembre 2015

Rails 4 - How to make a callback work only the first time a checkbox is clicked?

How to make a callback work only the first time a checkbox is clicked?

A "quote" model has a checkbox for approved by client. This initiates a callback that generates an invoice. However each time I check and uncheck the box the callback is initiated each time creating duplicate invoices each time. How can I avoid this?




Aucun commentaire:

Enregistrer un commentaire