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:
parent
ecb93280c2
commit
3d427118f3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user