summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-21 23:15:24 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-11-22 00:59:38 +0800
commit45568bed36095db0df94cf89a8a04458f56f33dc (patch)
treec6655290f3fbf1342650b934cdaf7de65326260a /app
parentffec300b9495f0fe022e777c889407433217497e (diff)
downloadgitlab-ce-45568bed36095db0df94cf89a8a04458f56f33dc.tar.gz
Updates based on feedback
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/spammable.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/concerns/spammable.rb b/app/models/concerns/spammable.rb
index 8b56894ec3a..5e4274619c4 100644
--- a/app/models/concerns/spammable.rb
+++ b/app/models/concerns/spammable.rb
@@ -12,6 +12,7 @@ module Spammable
attr_accessor :spam
attr_accessor :spam_log
+ alias_method :spam?, :spam
after_validation :check_for_spam, on: [:create, :update]
@@ -34,10 +35,6 @@ module Spammable
end
end
- def spam?
- spam
- end
-
def check_for_spam
error_msg = if Gitlab::Recaptcha.enabled?
"Your #{spammable_entity_type} has been recognized as spam. "\