Skip to content

Instantly share code, notes, and snippets.

@johnathan-sewell
Created January 13, 2015 14:25
Show Gist options
  • Save johnathan-sewell/44f81eb49637eb524f14 to your computer and use it in GitHub Desktop.
Save johnathan-sewell/44f81eb49637eb524f14 to your computer and use it in GitHub Desktop.
Backbone constructor for named objects when debugging
//replace initialize
initialize: function(attrs) {
//initialize here
},
//with
constructor: function User(attrs) {
Backbone.Model.apply(this, arguments);
//initialize here
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment