I’m trying to get the backbone.js DELETE request to fire, but don’t see any requests being made in my console.
I have collection model like so:
var Model = Backbone.Model.extend(
{
urlRoot: '/test',
defaults:{}
});
var TableList = Backbone.Collection.extend(
{
url: '/test',
model: Model
});
In my view I’m running this:
this.model.destroy();
Everything seems to be running fine, I can see output coming from the remove function that calls the destroy so I know it’s getting there plus it also successfully runs an unrender method that I have. Can’t see any requests being made to the sever though?
I found the issue to my problem, thought not a solution yet. I’m not sure this is a bug with backbone or not, but I’m using
ajaxSetupandajaxPrefilter. I tried commenting it out and it worked. I narrowed it down to the ajaxSetup method and the specifically the use of thedataparameter to preset some values.