2022-11-09 12:33:20 +01:00
|
|
|
= turbo_stream.replace dom_id(@attachment, :edit) do
|
|
|
|
- if @user_can_edit
|
2023-09-20 16:52:30 +02:00
|
|
|
= 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)
|
2022-11-09 12:33:20 +01:00
|
|
|
- else
|
|
|
|
= render Attachment::ShowComponent.new(attachment: @attachment)
|