[fix #1097] Accent insensitive search
This commit is contained in:
parent
6a2b575027
commit
2bc61f9f3f
4 changed files with 13 additions and 3 deletions
|
@ -14,7 +14,7 @@ class FindDubiousProceduresJob < ApplicationJob
|
|||
# https://www.postgresql.org/docs/current/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP
|
||||
forbidden_tdcs = TypeDeChamp
|
||||
.joins(:procedure)
|
||||
.where("types_de_champ.libelle ~* '#{forbidden_regexp}'")
|
||||
.where("unaccent(types_de_champ.libelle) ~* unaccent('#{forbidden_regexp}')")
|
||||
.where(type_champ: %w(text textarea))
|
||||
.where(procedures: { archived_at: nil, whitelisted_at: nil })
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue