cleanup: more concistent methods usage

This commit is contained in:
Paul Chavard 2024-08-22 17:38:04 +02:00
parent f02ec3da82
commit c94d1b7eea
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -932,7 +932,7 @@ class Dossier < ApplicationRecord
end
def remove_titres_identite!
champs_public.filter(&:titre_identite?).map(&:piece_justificative_file).each(&:purge_later)
champs.filter(&:titre_identite?).map(&:piece_justificative_file).each(&:purge_later)
end
def remove_piece_justificative_file_not_visible!
@ -1147,7 +1147,7 @@ class Dossier < ApplicationRecord
end
def has_annotations?
revision.revision_types_de_champ_private.present?
revision.types_de_champ_private.present?
end
def hide_info_with_accuse_lecture?

View file

@ -32,8 +32,8 @@ class ProcedureRevisionTypeDeChamp < ApplicationRecord
end
def siblings
if parent_id.present?
revision.revision_types_de_champ.where(parent_id: parent_id).ordered
if child?
revision.revision_types_de_champ.where(parent_id:).ordered
elsif private?
revision.revision_types_de_champ_private
else

View file

@ -12,7 +12,7 @@
- if unspecified_attestation_champs.present?
.warning
Attention, les valeurs suivantes nont pas été renseignées mais sont nécessaires pour pouvoir envoyer une attestation valide :
- unspecified_annotations_privees, unspecified_champs = unspecified_attestation_champs.partition(&:private)
- unspecified_annotations_privees, unspecified_champs = unspecified_attestation_champs.partition(&:private?)
- if unspecified_champs.present?
%h4 Champs de la demande