dimanche 4 juin 2017

Rails: Duplicate index occurs when I am creating object using find_or_create_by

there is a before_save callback in model one, in which I am trying to create/update record using find_or_create_by. There is another after_update callback in model two, in which I am updating model one object. Now, It through duplicate entry/index ....

Aucun commentaire:

Enregistrer un commentaire