demarches-normaliennes/app/views/attachments/show.turbo_stream.haml
Colin Darie 44578ba65c fix(attachment): keep direct_upload behavior in poll url
Co-Authored-By: Christophe Robillard <christophe.robillard@beta.gouv.fr>
2023-09-22 10:24:16 +02:00

5 lines
370 B
Text

= turbo_stream.replace dom_id(@attachment, :edit) do
- if @user_can_edit
= render Attachment::EditComponent.new(attachment: @attachment, attached_file: @attachment.record.public_send(@attachment.name), auto_attach_url: @auto_attach_url, view_as: @view_as, direct_upload: @direct_upload)
- else
= render Attachment::ShowComponent.new(attachment: @attachment)