summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/note.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index d8494edd532..4c46c7dfffa 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -105,6 +105,12 @@ class Note < ActiveRecord::Base
def upvote?
note.start_with?('+1') || note.start_with?(':+1:')
end
+
+ # Returns true if this is a downvote note,
+ # otherwise false is returned
+ def downvote?
+ note.start_with?('-1') || note.start_with?(':-1:')
+ end
end
# == Schema Information
#