Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Template.recentNotifications.helpers({
  2. // Check the current notification type for template usage.
  3. notificationType: function (type) {
  4. return this.type === type;
  5. },
  6. // Return set of notifcation cursors.
  7. notifications: function () {
  8. return Notifications.find( {}, { sort: { createdAt: -1 } } );
  9. },
  10. // Helper for comment related notification data.
  11. comment: function() {
  12. Meteor.subscribe('commentPostId', this.sourceId);
  13. return Comments.findOne(this.sourceId);
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement