New bindings to vote on notes.
This commit is contained in:
parent
5f595be4b8
commit
4dc09e5c1d
1 changed files with 4 additions and 2 deletions
|
@ -199,7 +199,8 @@ class Note < ActiveRecord::Base
|
|||
def downvote?
|
||||
votable? && (note.start_with?('-1') ||
|
||||
note.start_with?(':-1:') ||
|
||||
note.start_with?(':thumbsdown:')
|
||||
note.start_with?(':thumbsdown:') ||
|
||||
note.start_with?(':thumbs_down_sign:')
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -249,7 +250,8 @@ class Note < ActiveRecord::Base
|
|||
def upvote?
|
||||
votable? && (note.start_with?('+1') ||
|
||||
note.start_with?(':+1:') ||
|
||||
note.start_with?(':thumbsup:')
|
||||
note.start_with?(':thumbsup:') ||
|
||||
note.start_with?(':thumbs_up_sign:')
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue