Comment: fix an off-by-one

This commit is contained in:
Carl Chenet 2017-05-16 18:38:51 +02:00
parent b36bc14980
commit 84e125c328

View file

@ -324,7 +324,7 @@ class Comment < ActiveRecord::Base
end
def is_downvotable?
if self.created_at && self.score >= DOWNVOTABLE_MIN_SCORE
if self.created_at && self.score > DOWNVOTABLE_MIN_SCORE
Time.now - self.created_at <= DOWNVOTABLE_DAYS.days
else
false