Add downvotes
This commit is contained in:
parent
a2a0060034
commit
2e0d5c2250
2 changed files with 48 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue