Add downvotes

This commit is contained in:
Riyad Preukschas 2012-09-08 02:30:47 +02:00
parent a2a0060034
commit 2e0d5c2250
2 changed files with 48 additions and 17 deletions

View file

@ -3,4 +3,9 @@ module Votes
def upvotes
notes.select(&:upvote?).size
end
# Return the number of -1 comments (downvotes)
def downvotes
notes.select(&:downvote?).size
end
end