Skip to content

Instantly share code, notes, and snippets.

@gouthamvel
Created May 21, 2012 08:17
Show Gist options
  • Save gouthamvel/2761135 to your computer and use it in GitHub Desktop.
Save gouthamvel/2761135 to your computer and use it in GitHub Desktop.
destroy: function(opt){
if(!this.id){
console.log('differing')
var fun = _.bind(Backbone.Model.prototype.destroy.call, this)
_.delay(fun,1000,[this,opt]);
}
else
Backbone.Model.prototype.destroy.call(this,opt);
},
// console logs in browser
// differing
// underscore.js:517Uncaught TypeError: object is not a function
// _.delay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment