-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$.Model.delete URL cannot be templated beyond {id} #130
Comments
A custom destroy method won't work because makeRequest strips out all the useful bits. I thought about refactoring the url substitution so that it happened in makeRequest instead of the anonymous ajax/$.Model._ajax method, but would that break all the custom ajax calls out there? |
I've given this a lot more thought. I think this patch fixes the issue without breaking everybody. It'd be nice if the url substitution only happened once though. This manages to not break any tests, and it doesn't change the order of parameters.
|
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.
The text was updated successfully, but these errors were encountered: