Skip to content

Commit

Permalink
fixes tastejs#617 - added Meteor.methods
Browse files Browse the repository at this point in the history
To call the `remove` method on the server side from the client side.
  • Loading branch information
snize committed Jun 28, 2013
1 parent eb2d7cb commit 006fbfa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion labs/architecture-examples/meteor/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@ if (Meteor.is_client) {
// Register click events for clearing completed todos
Template.footer.events = {
'click button#clear-completed': function() {
Todos.remove({completed: true});
Meteor.call('clearCompleted');
}
};
}

Meteor.methods({
clearCompleted: function () {
Todos.remove({completed: true});
}
});

0 comments on commit 006fbfa

Please sign in to comment.