Make notes recognize downvotes
This commit is contained in:
parent
cc7c6d5396
commit
06c1a8a9ae
2 changed files with 21 additions and 8 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue