examples/backbone.localStorage.js
function(model) {
    this.localStorage().setItem(this.name+"-"+model.id, JSON.stringify(model));
    if (!_.include(this.records, model.id.toString()))
      this.records.push(model.id.toString()); this.save();
    return this.find(model);
  }
function(model) {
    this.localStorage().setItem(this.name+"-"+model.id, JSON.stringify(model));
    if (!_.include(this.records, model.id.toString()))
      this.records.push(model.id.toString()); this.save();
    return this.find(model);
  }
function ( model ) { this . localStorage ( ) . setItem ( this . name + "-" + model . id , JSON . stringify ( model ) ) ; if ( ! _ . include ( this . records , model . id . toString ( ) ) ) this . records . push ( model . id . toString ( ) ) ; this . save ( ) ; return this . find ( model ) ; }
Update a model by replacing its copy in `this.data`.
Update a model by replacing its copy in this . data .