diff options
| author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-09-08 02:08:35 +0200 |
|---|---|---|
| committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-09-08 16:05:48 +0200 |
| commit | 06c1a8a9ae34e2a4fe7b4f4edb58bacfaf6df5c9 (patch) | |
| tree | cb195dda9c5d668aaeba026747fef1a43e731b6a /app/models/note.rb | |
| parent | cc7c6d53966e7501da0af87481b7e7ef2b2025c2 (diff) | |
| download | gitlab-ce-06c1a8a9ae34e2a4fe7b4f4edb58bacfaf6df5c9.tar.gz | |
Make notes recognize downvotes
Diffstat (limited to 'app/models/note.rb')
| -rw-r--r-- | app/models/note.rb | 6 |
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 # |
