Update Note#upvote? to support emoji voting

This commit is contained in:
Robert Speicher 2012-09-06 15:31:25 -04:00
parent 3a63f6f316
commit 2faa4bba40
2 changed files with 11 additions and 1 deletions

View file

@ -103,7 +103,7 @@ class Note < ActiveRecord::Base
# Returns true if this is an upvote note,
# otherwise false is returned
def upvote?
note =~ /^\+1/ ? true : false
note.start_with?('+1') || note.start_with?(':+1:')
end
end
# == Schema Information