Backbone-relational
Backbone-relational copied to clipboard
findOrCreate not passing options to the parse method.
The Backbone docs suggest that the parse method takes a second optional argurment for options. The findOrCreate method [line 1641] is not passing the options on to the parse method.
var parsedAttributes = ( _.isObject( attributes ) && options.parse && this.prototype.parse ) ?
this.prototype.parse( attributes ) : attributes;
Should be:
var parsedAttributes = ( _.isObject( attributes ) && options.parse && this.prototype.parse ) ?
this.prototype.parse( attributes, options ) : attributes;
Hi Steven. Can you submit a test case that fails without a patch, showing your desired behavior?
have to keep fixing this myself, currently its line 1797. I dont think there is any extra 'desired behaviour' here other than the parse function should be sent the options in order not to break the backbone interface (its passed in every other case in this project so why not here?).