gitlabhq/app/roles/votes.rb
2012-09-08 16:05:48 +02:00

7 lines
117 B
Ruby

module Votes
# Return the number of +1 comments (upvotes)
def upvotes
notes.select(&:upvote?).size
end
end