I am currently working with this function:
// Check if the object already exists.
// If it does, the object is deleted and then created again.
save: function(url, obj, errors) {
this.get(url, obj);
this.create(url, obj, errors);
};
Despite the order in which I call get and create, the POST method always executes first. Is there a way to prevent this? You can view the full code here
For those facing the same issue, here is the SOLUTION (Thanks Hatsjoem!):