I’m trying to update a record in DB so I’m defining model with data and calling .save() method. The PUT request is triggered and the database entry is updated. The problem is neither success or error callbacks are called. What could be the cause?
sessionsModel.save({
error: function() {
alert('test');
},
success: function () {
alert('test');
}
});
Edit: Request returns JSON object
Just found similar problem where the issue was solved. You have to put something as first parameter (I put null since my model was already populated with data explicitly) and object with callbacks as second. So something like;