BigW Consortium Gitlab

Commit 4dc09e5c by Marin Jankovski

New bindings to vote on notes.

parent 5f595be4
...@@ -199,7 +199,8 @@ class Note < ActiveRecord::Base ...@@ -199,7 +199,8 @@ class Note < ActiveRecord::Base
def downvote? def downvote?
votable? && (note.start_with?('-1') || votable? && (note.start_with?('-1') ||
note.start_with?(':-1:') || note.start_with?(':-1:') ||
note.start_with?(':thumbsdown:') note.start_with?(':thumbsdown:') ||
note.start_with?(':thumbs_down_sign:')
) )
end end
...@@ -249,7 +250,8 @@ class Note < ActiveRecord::Base ...@@ -249,7 +250,8 @@ class Note < ActiveRecord::Base
def upvote? def upvote?
votable? && (note.start_with?('+1') || votable? && (note.start_with?('+1') ||
note.start_with?(':+1:') || note.start_with?(':+1:') ||
note.start_with?(':thumbsup:') note.start_with?(':thumbsup:') ||
note.start_with?(':thumbs_up_sign:')
) )
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment