Skip to content

Commit

Permalink
set like/dislike booleans in case we need them
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshaler committed Jun 3, 2012
1 parent f297606 commit 842540f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/ActivityItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ var ActivityItemSchema = new Schema({

ActivityItemSchema.methods.like = function(cb) {
var self = this;
self.liked = true;
self.disliked = false;
self.increment_rating("likes", cb);
}

ActivityItemSchema.methods.dislike = function(cb) {
var self = this;
self.liked = false;
self.disliked = true;
self.increment_rating("dislikes", cb);
}

Expand Down

0 comments on commit 842540f

Please sign in to comment.