jeudi 4 août 2016

What is the correct way to handle validation errors in Ember when rollbackAttributes() leave the record unusable

I suppose I naively thought that when a user fills out a form that fails to save and the server returns 422 Unprocessable Entity I could just use rollbackAttributes() and let the user put in new values and try again.

Unfortunately, rollbackAttributes() seems the leave the record in state root.deleted.saved which makes it unusable.

More discussion here.

What is the point of rolling back if the record is unuseable? What is the correct way to handle this?

Thanks!




Aucun commentaire:

Enregistrer un commentaire