Skip to content

Instantly share code, notes, and snippets.

@whistler
Last active August 29, 2015 14:23
Show Gist options
  • Save whistler/ec0846a012c40ac1a09c to your computer and use it in GitHub Desktop.
Save whistler/ec0846a012c40ac1a09c to your computer and use it in GitHub Desktop.

Revisions

  1. Ibrahim Muhammad revised this gist Jun 18, 2015. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions this.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,13 @@
    function Animal() {
    var AnimalView = Backbone.View.extend({
    ..
    save: function() {
    var that = this;
    if(!this.is_saved) {
    that.is_saved = that.saver.save()
    if(!this.isSaved) {
    that.model.save()
    } else {
    that.alreadySaved();
    }
    }
    },
    ..
    }
    })

  2. Ibrahim Muhammad revised this gist Jun 18, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions this.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@

    function Animal() {
    ..
    save: function() {
    var that = this;
    if(!this.is_saved) {
    this.is_saved = this.saver.save()
    that.is_saved = that.saver.save()
    }
    }
    ..
  3. Ibrahim Muhammad created this gist Jun 18, 2015.
    10 changes: 10 additions & 0 deletions this.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@

    function Animal() {
    ..
    save: function() {
    if(!this.is_saved) {
    this.is_saved = this.saver.save()
    }
    }
    ..
    }