5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-20 15:37:04 +00:00

Comment: prevent me-too replies

This commit is contained in:
joshua stein 2017-04-12 20:45:33 -05:00
parent ecb93280c2
commit 3d427118f3

View File

@ -47,6 +47,9 @@ class Comment < ActiveRecord::Base
self.comment.to_s.strip.match(/\Atl;?dr.?$\z/i) &&
errors.add(:base, "Wow! A blue car!")
self.comment.to_s.strip.match(/\Ame too.?\z/i) &&
errors.add(:base, "Please just upvote the parent post instead.")
end
def self.arrange_for_user(user)