Sha256: af9cc798d43711c67e5eb52e12825fb4f98fe6ab373b47394d56e50a6afad11f

Contents?: true

Size: 671 Bytes

Versions: 7

Compression:

Stored size: 671 Bytes

Contents

(function() {
  if (typeof Spine === "undefined" || Spine === null) {
    Spine = require('spine');
  }
  Spine.Model.Local = {
    extended: function() {
      this.change(this.saveLocal);
      return this.fetch(this.loadLocal);
    },
    saveLocal: function() {
      var result;
      result = JSON.stringify(this);
      return localStorage[this.className] = result;
    },
    loadLocal: function() {
      var result;
      result = localStorage[this.className];
      return this.refresh(result || [], {
        clear: true
      });
    }
  };
  if (typeof module !== "undefined" && module !== null) {
    module.exports = Spine.Model.Local;
  }
}).call(this);

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spine-rails-0.0.9 app/assets/javascripts/spine/local.js
spine-rails-0.0.8 app/assets/javascripts/spine/local.js
spine-rails-0.0.7 app/assets/javascripts/spine/local.js
spine-rails-0.0.6 app/assets/javascripts/spine/local.js
spine-rails-0.0.5 app/assets/javascripts/spine/local.js
spine-rails-0.0.4 app/assets/javascripts/spine/local.js
spine-rails-0.0.3 app/assets/javascripts/spine/local.js