This commit is contained in:
KMY 2023-12-06 13:11:38 +09:00
parent 0199608b87
commit 210b23cfc7
4 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
class Admin::SensitiveWord
class << self
def sensitive?(text, spoiler_text)
exposure_text = (spoiler_text.presence || text)
exposure_text = spoiler_text.presence || text
(spoiler_text.blank? && sensitive_words.any? { |word| include?(text, word) }) ||
sensitive_words_for_full.any? { |word| include?(exposure_text, word) }
end