Meteor - Adding a favourite/like user accounts -
i have page display list users. current user "is_teacher" able 'like' individual users in list. likes visible teacher. thought best way add likes: string in collection , store students_id code must way off because not working. can checkout i've done let me know i'm going wrong. path: schemas.js schema.userprofile = new simpleschema({ likes: { type: [string], optional: true } }); path: sudentlist.html <template name="studentlist"> {{#each student}} {{#if like}} <button class="like">unlike</button> {{else}} <button class="like">like</button> {{/if}} {{/each}} </template> path: studentlist.js template.studentlist.helpers({ like: function() { return meteor.users.findone({likes: this._id}); } }); template.studentlist.events({ 'click #like':function(event,template) { var student = this._...