Closed
Description
I would like to see the same save(), destroy(), etc.
on the returned item instances by default. Is there currently a reason why they aren't?
// Example code
ModelName.find(1).then(function (item) {
item.destroy();
});
For the mean time I am adding them with defineResource()
.
var Model = DS.defineResource({
name: 'subjects',
methods: {
destroy: function () {
return Model.destroy(this.id);
}
}
});