codebrew/backbone-rails — Issue #90: save() triggering error, but no noticeable error given
Author: unclaimedbaggage
Created: 2012-01-26 19:35:17+00:00
State: open

Hi folks,

I have the following code in a backbone-rails view:

$(@el).droppable({
hoverClass: 'hoverTask',
appendTo: "body",
drop: (event, ui) =>
...
task_model = @options.tasks.get(task_id)
task_model.save({due: due_date}, {
success: () =>
console.log 'it was successful'
error: () =>
console.log 'error'
})

The problem is, the save is triggering error() every time, despite the rails side of thing saving successfully, the backbone side of things updating successfully, and no error being thrown in either the rails logs or the browser console. Any ideas what could be going on here?