ember.js - Deleting records with Basic Adapter -
i'm looking @ implementing model.sync.deleterecord()
use ember-data basic adaptor.
according docs, adapter must call diddeleterecord()
once record has been deleted server.
however, can't find example on how call diddeleterecord()
. after looking @ source, best come this:
deleterecord: function(record, process) { my_api.remove(record.get('id')).then(function() { var r = process(record); r.store.adapter.diddeleterecord(r.store, r.type, r.record); }); }
is there better, less uglier ways call diddeleterecord()
?
Comments
Post a Comment