Skip to content

Commit

Permalink
fixes inconsistency between example and jsbin
Browse files Browse the repository at this point in the history
  • Loading branch information
twokul committed Oct 9, 2013
1 parent 353b1ae commit 9df02c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/guides/getting-started/accepting-edits.md
Expand Up @@ -52,8 +52,13 @@ actions: {
this.set('isEditing', true);
},
acceptChanges: function () {
this.set('isEditing', false);
this.get('model').save();
this.set('isEditing', false);

if (Ember.isEmpty(this.get('model.title'))) {
this.send('removeTodo');
} else {
this.get('model').save();
}
}
}
// ... additional lines truncated for brevity ...
Expand Down

0 comments on commit 9df02c0

Please sign in to comment.