Fix irreversible and whole_word parameters handling in /api/v1/filters (#21988)

Fixes #21965
This commit is contained in:
Claire
2022-12-07 00:10:53 +01:00
committed by GitHub
parent f80c3d40e8
commit 69137f4a90
3 changed files with 27 additions and 7 deletions

View File

@@ -54,7 +54,7 @@ class CustomFilter < ApplicationRecord
end
def irreversible=(value)
self.action = value ? :hide : :warn
self.action = ActiveModel::Type::Boolean.new.cast(value) ? :hide : :warn
end
def irreversible?