Use enum to the fullest with TypeDeChamp.type_champs
This commit is contained in:
parent
16a719922b
commit
2d3b553e4d
21 changed files with 94 additions and 94 deletions
|
@ -19,7 +19,7 @@ class FindDubiousProceduresJob < ApplicationJob
|
|||
forbidden_tdcs = TypeDeChamp
|
||||
.joins(:procedure)
|
||||
.where("unaccent(types_de_champ.libelle) ~* unaccent(?)", forbidden_regexp)
|
||||
.where(type_champ: %w(text textarea))
|
||||
.where(type_champ: [TypeDeChamp.type_champs.fetch(:text), TypeDeChamp.type_champs.fetch(:textarea)])
|
||||
.where(procedures: { archived_at: nil, whitelisted_at: nil })
|
||||
|
||||
dubious_procedures_and_tdcs = forbidden_tdcs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue