Last active
August 29, 2015 14:19
-
-
Save shrop/9ac76dca956759f87c63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.recentNotifications.helpers({ | |
// Check the current notification type for template usage. | |
notificationType: function (type) { | |
return this.type === type; | |
}, | |
// Return set of notifcation cursors. | |
notifications: function () { | |
return Notifications.find( {}, { sort: { createdAt: -1 } } ); | |
}, | |
// Helper for comment related notification data. | |
comment: function() { | |
Meteor.subscribe('commentPostId', this.sourceId); | |
return Comments.findOne(this.sourceId); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment