Skip to content

Instantly share code, notes, and snippets.

@netikular
Created December 2, 2012 12:04
Show Gist options
  • Save netikular/4188361 to your computer and use it in GitHub Desktop.
Save netikular/4188361 to your computer and use it in GitHub Desktop.
remove from a list
clearAll: function (e) {
e.preventDefault();
var toRemove = this.collection.chain().filter(function(item){
return item.get('IsCompleted');
}).invoke('destroy');
this.collection.remove(toRemove);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment