// The $.Model.destroy method
return function( id, success, error ) {
var attrs = {};
attrs[this.id] = id;
return ajax( str || this._shortName+"/{"+this.id+"}", attrs, success, error, fixture(this, "Destroy", "-restDestroy"), "delete")
}
As you can see the attrs is stripped down, so the rest of the attrs are unavailable for URL substitution.
My REST server uses nested urls to denote hierarchy; /document/3/property/7 (represented as "{docUrl}/property/{id}/"), etc. I need to be able to operate on different urls based on the document context, but I have to write a custom delete so that I can substitute the URL properly.
As you can see the attrs is stripped down, so the rest of the attrs are unavailable for URL substitution.
My REST server uses nested urls to denote hierarchy; /document/3/property/7 (represented as "{docUrl}/property/{id}/"), etc. I need to be able to operate on different urls based on the document context, but I have to write a custom delete so that I can substitute the URL properly.