diff options
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 943d09d983b..9b7c37dd23e 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -84,7 +84,7 @@ class Snippet < ApplicationRecord participant :notes_with_associations attr_spammable :title, spam_title: true - attr_spammable :content, spam_description: true + attr_spammable :description, spam_description: true attr_encrypted :secret_token, key: Settings.attr_encrypted_db_key_base_truncated, @@ -269,13 +269,7 @@ class Snippet < ApplicationRecord def check_for_spam?(user:) visibility_level_changed?(to: Snippet::PUBLIC) || - (public? && (title_changed? || content_changed?)) - end - - # snippets are the biggest sources of spam - override :allow_possible_spam? - def allow_possible_spam? - false + (public? && (title_changed? || description_changed?)) end def spammable_entity_type |