Skip to content

Instantly share code, notes, and snippets.

@michaltakac
Created October 16, 2015 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaltakac/ccfa343536da5cb111ec to your computer and use it in GitHub Desktop.
Save michaltakac/ccfa343536da5cb111ec to your computer and use it in GitHub Desktop.
Braintree demo - dashboard.js (v2)
Template.dashboard.onCreated(function() {
var instance = this;
instance.autorun(function() {
instance.subscribe('items');
});
});
Template.dashboard.helpers({
items: function(){
return Items.find();
},
showForm: function() {
var userId = Meteor.userId();
return Roles.userIsInRole(userId, 'paid') ? false : true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment