I think that overriding DS.RESTAdapter
updateRecord
and deleteRecord
might work:
DS.RESTAdapter.reopen({ updateRecord: function(store, type, record) { var data = {}; var serializer = store.serializerFor(type.typeKey); serializer.serializeIntoHash(data, type, record); var id = Ember.get(record, 'id'); return this.ajax(this.buildURL(type.typeKey, id), "POST", { data: data }); }, deleteRecord: function(store, type, record) { var id = Ember.get(record, 'id'); return this.ajax(this.buildURL(type.typeKey, id), "POST"); } });
source share