tech(review): add a guard clause to prevent missing pdf, enhance specs
This commit is contained in:
parent
2944a0c2c3
commit
3a895fbd4a
3 changed files with 59 additions and 32 deletions
|
@ -20,7 +20,7 @@
|
|||
- c.with_value do
|
||||
= simple_format dossier.motivation
|
||||
|
||||
- if dossier.attestation.present?
|
||||
- if dossier.attestation.present? && dossier.attestation.pdf.attached?
|
||||
= render Dossiers::RowShowComponent.new(label: "Attestation") do |c|
|
||||
- c.with_value do
|
||||
= render Dsfr::DownloadComponent.new(attachment: dossier.attestation.pdf, name: t(:download_attestation, scope: [:views, :shared, :dossiers, :form]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue