mardi 27 septembre 2016

Ember: difference between unloadRecord and destroy for new records

In the context of a route model that hasn't been persisted to the backend yet (its id is null still and we haven't called save yet), if we want to discard the record, is it more correct to use unloadRecord or destroy?

Context: For use when a form is transitioned away from but is neither saved nor canceled. I'm new to ember and I am a bit confused by the fact that unloadRecord is private for Model but not for Store. It may be obvious but I am also not positive when it is correct to refer to the object as a model vs. a record (I am assuming they are sometimes used interchangeably but it's technically correct to call them records if they are existing instances).




Aucun commentaire:

Enregistrer un commentaire