Skip to content

Instantly share code, notes, and snippets.

@jonathanKingston
Created May 12, 2012 19:55
Show Gist options
  • Save jonathanKingston/2668583 to your computer and use it in GitHub Desktop.
Save jonathanKingston/2668583 to your computer and use it in GitHub Desktop.
Filters psudo code
Meteor.methods({
'sabotage'
});
Meteor.filters({
'checkIsABeastieBoy'
});
function checkIsABeastieBoy(args) {
if(args.user == 'Yauch') {
return true;
}
//Users here can also play with args here if they like too: args.user = 'so so so..'
//even returning anything but true causes the meteor method not to be called.
}
function sabotage() {
//destroy the musical planet
}
//CLIENT
Meteor.call('sabotage', {user: 'Yauch'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment