feat(champ): has_one_attached => has_many_attached piece_justificative_file

This commit is contained in:
Colin Darie 2022-10-20 10:14:47 +02:00
parent 2cdbcbf0b6
commit 91f4971df2
5 changed files with 11 additions and 11 deletions

View file

@ -261,16 +261,16 @@ class Dossier < ApplicationRecord
includes(champs_public: [
:type_de_champ,
:geo_areas,
piece_justificative_file_attachment: :blob,
champs: [:type_de_champ, piece_justificative_file_attachment: :blob]
piece_justificative_file_attachments: :blob,
champs: [:type_de_champ, piece_justificative_file_attachments: :blob]
])
}
scope :with_annotations, -> {
includes(champs_private: [
:type_de_champ,
:geo_areas,
piece_justificative_file_attachment: :blob,
champs: [:type_de_champ, piece_justificative_file_attachment: :blob]
piece_justificative_file_attachments: :blob,
champs: [:type_de_champ, piece_justificative_file_attachments: :blob]
])
}
scope :for_api, -> {
@ -279,7 +279,7 @@ class Dossier < ApplicationRecord
.includes(commentaires: { piece_jointe_attachment: :blob },
justificatif_motivation_attachment: :blob,
attestation: [],
avis: { piece_justificative_file_attachment: :blob },
avis: { piece_justificative_file_attachments: :blob },
traitement: [],
etablissement: [],
individual: [],