Better funding spam block

This commit is contained in:
2017-02-15 14:32:41 +01:00
parent 23bd4c9a58
commit 3caf808e22
2 changed files with 107 additions and 119 deletions
+1
View File
@@ -14,6 +14,7 @@ module Cmtool
def if_there_are_bad_intentions
has_bad_intentions = false
has_bad_intentions = true if "#{email}#{body}" =~ /funded\.com/i
has_bad_intentions = true if email.to_s =~ /capital|funding|funded/i
errors.add(:base, :bad_intentions) if has_bad_intentions
end
end