diff options
| author | vagrant <vagrant@precise32.(none)> | 2013-11-28 20:05:37 +0000 |
|---|---|---|
| committer | vagrant <vagrant@precise32.(none)> | 2013-11-28 20:05:37 +0000 |
| commit | 64efc05229b04d9928d621572d01bb1952ac0f65 (patch) | |
| tree | 0f1f9065020e1f7feee2d102c558a839727d4124 /app/models | |
| parent | 2e07865f16f96bc4706758cc5f2634574d38be37 (diff) | |
| download | gitlab-ce-64efc05229b04d9928d621572d01bb1952ac0f65.tar.gz | |
added thumbsup and thumsdown emoji voting with rspec tests
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/note.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 7e7387abed6..8284da8616f 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -157,7 +157,8 @@ class Note < ActiveRecord::Base # otherwise false is returned def downvote? votable? && (note.start_with?('-1') || - note.start_with?(':-1:') + note.start_with?(':-1:') || + note.start_with?(':thumbsdown:') ) end @@ -206,7 +207,8 @@ class Note < ActiveRecord::Base # otherwise false is returned def upvote? votable? && (note.start_with?('+1') || - note.start_with?(':+1:') + note.start_with?(':+1:') || + note.start_with?(':thumbsup:') ) end |
