fix: url helper method calls for files
This commit is contained in:
parent
f78b415c51
commit
3aa6a5e28e
8 changed files with 8 additions and 8 deletions
|
@ -11,7 +11,7 @@
|
|||
- elsif export.available?
|
||||
- menu.with_item do
|
||||
%div
|
||||
= link_to ready_link_label(export), export.file.service_url, target: "_blank", rel: "noopener", role: 'menuitem'
|
||||
= link_to ready_link_label(export), export.file.url, target: "_blank", rel: "noopener", role: 'menuitem'
|
||||
- if export.old?
|
||||
= button_to download_export_path(export_format: export.format, force_export: true), refresh_button_options(export).merge(role: 'menuitem') do
|
||||
.icon.retry
|
||||
|
|
|
@ -15,7 +15,7 @@ module Administrateurs
|
|||
end
|
||||
|
||||
format.html do
|
||||
redirect_to export.file.service_url
|
||||
redirect_to export.file.url
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
|
@ -19,7 +19,7 @@ module Instructeurs
|
|||
|
||||
def attestation
|
||||
if dossier.attestation.pdf.attached?
|
||||
redirect_to dossier.attestation.pdf.service_url
|
||||
redirect_to dossier.attestation.pdf.url
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ module Instructeurs
|
|||
end
|
||||
|
||||
format.html do
|
||||
redirect_to export.file.service_url
|
||||
redirect_to export.file.url
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
|
@ -73,7 +73,7 @@ module Users
|
|||
|
||||
def attestation
|
||||
if dossier.attestation&.pdf&.attached?
|
||||
redirect_to dossier.attestation.pdf.service_url
|
||||
redirect_to dossier.attestation.pdf.url
|
||||
else
|
||||
flash.notice = t('.no_longer_available')
|
||||
redirect_to dossier_path(dossier)
|
||||
|
|
|
@ -11,7 +11,7 @@ module Types
|
|||
if object.is_a?(Hash)
|
||||
object[:url]
|
||||
else
|
||||
object.service_url
|
||||
object.url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -55,7 +55,7 @@ class Champs::PieceJustificativeChamp < Champ
|
|||
return nil if attachment.nil?
|
||||
|
||||
if attachment.virus_scanner.safe? || attachment.virus_scanner.pending?
|
||||
attachment.service_url
|
||||
attachment.url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -86,7 +86,7 @@ class Export < ApplicationRecord
|
|||
|
||||
def flash_message
|
||||
if available?
|
||||
"L’export au format \"#{format}\" est prêt. Vous pouvez le <a href=\"#{file.service_url}\">télécharger</a>"
|
||||
"L’export au format \"#{format}\" est prêt. Vous pouvez le <a href=\"#{file.url}\">télécharger</a>"
|
||||
else
|
||||
"Nous générons cet export. Veuillez revenir dans quelques minutes pour le télécharger."
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue