mercredi 10 janvier 2018

Soft delete records in Ember

I'm using the paranoia gem on my Rails backend to manage soft deletions of records, however calling destroyRecord() on the Ember model causes it to be marked as deleted, hiding it from the collection on the frontend. On a page refresh, the record re-appears since it actually still exists in the backed albeit with a deleted_at timestamp set.

What is the best way to handle this in Ember? I'd like to be able to call deleteRecord() and not have the deleted flag set, but only for this model.




Aucun commentaire:

Enregistrer un commentaire