I need to add a function for all my models, but I can“t do how to recognize the model as "this" scope variable. My function will do my model can be reseted to the defaults and by some data-object as parameter:
Backbone.Model.prototype.reset = function( data ){
this.set(this.defaults);
$.each( data, function( key, value ){
this.set( key, value );
});
}