documentcloud/backbone — Issue #939: save's error handler is not receiving the model
Author: davisre
Created: 2012-02-02 22:04:22+00:00
State: open
Labels: duplicate

Error handlers are being passed the response twice instead of the model and the response. Here's a self-contained example in CS:

class Thing extends Backbone.Model
url: "/thing"

thing = new Thing

thing.save {}, error: (thing, response) ->
console.log "thing is the response" if thing == response
console.log "thing: #{JSON.stringify thing}"