-
Notifications
You must be signed in to change notification settings - Fork 421
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.destroy request params #428
Comments
The placeholder |
So what does that code mean in models.js? // `destroy` does not need data. if ( type == 'destroy' ) { args.shift(); } // `update` and `destroy` need the `id`. if ( type !== 'create' ) { args.unshift(getId(self)); } In Ajax options generator function data contains only id, so any other params in {} are replaced with false. |
this code removes all data other than id destroy : { type : "delete", data : function(id){ var args = {}; args.id = args[this.id] = id; return args; } }, |
so, will you consider this a bug or feature to add? Besides I don't know how to create fiddle that will show the behaviour. It blocks all ajax requests. But look at the code I supplied it is obvious. |
I agree, it should allow all parameters. |
Fixed with #492. |
Why not make possible to make destroy request with other params then just "id"?
destroy: 'DELETE /api/items/{some_other_id_attr}'
The text was updated successfully, but these errors were encountered: