|
@@ -1,7 +1,16 @@
|
|
|
Tasks = new Mongo.Collection("tasks");
|
|
|
|
|
|
+if (Meteor.isServer) {
|
|
|
+ Meteor.publish('tasks', function () {
|
|
|
+ var ret = Tasks.find();
|
|
|
+ return ret;
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
if (Meteor.isClient) {
|
|
|
// This code only runs on the client
|
|
|
+ Meteor.subscribe('tasks');
|
|
|
+
|
|
|
Template.body.helpers({
|
|
|
tasks: function () {
|
|
|
if (Session.get('hideCompleted')) {
|