refactor(dossier): refactor pieces jointes
This commit is contained in:
parent
3516bae008
commit
3bbcda9c04
3 changed files with 31 additions and 39 deletions
|
@ -8,11 +8,19 @@ module BlobImageProcessorConcern
|
|||
end
|
||||
|
||||
def representation_required?
|
||||
attachments.any? { _1.record.class == Champs::TitreIdentiteChamp || _1.record.class == Champs::PieceJustificativeChamp || _1.record.class == Commentaire }
|
||||
from_champ? || from_messagerie?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def from_champ?
|
||||
attachments.any? { _1.record.class == Champs::TitreIdentiteChamp || _1.record.class == Champs::PieceJustificativeChamp }
|
||||
end
|
||||
|
||||
def from_messagerie?
|
||||
attachments.any? { _1.record.class == Commentaire }
|
||||
end
|
||||
|
||||
def watermark_required?
|
||||
attachments.any? { _1.record.class == Champs::TitreIdentiteChamp }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue