refactor(champ): mandatory_blank_and_visible? -> mandatory_blank?

As the method does not check visibility
This commit is contained in:
simon lehericey 2022-10-17 10:38:23 +02:00 committed by LeSim
parent 6832b12bd4
commit 9bba2093be
8 changed files with 18 additions and 18 deletions

View file

@ -983,7 +983,7 @@ class Dossier < ApplicationRecord
def check_mandatory_champs
(champs + champs.filter(&:block?).filter(&:visible?).flat_map(&:champs))
.filter(&:mandatory_blank_and_visible?)
.filter(&:mandatory_blank?)
.map do |champ|
"Le champ #{champ.libelle.truncate(200)} doit être rempli."
end