From e27606f443b846a7fbe99ec47b31ae3fa5097c66 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 3 Dec 2023 13:03:36 +0200 Subject: [PATCH] use rails storage proxy for audit log url --- app/models/submission.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/submission.rb b/app/models/submission.rb index 48ec202c0..33f01c4bb 100644 --- a/app/models/submission.rb +++ b/app/models/submission.rb @@ -72,7 +72,9 @@ class Submission < ApplicationRecord }, scope: false, prefix: true def audit_trail_url - audit_trail&.url + return if audit_trail.blank? + + Rails.application.routes.url_helpers.rails_storage_proxy_url(audit_trail, **Docuseal.default_url_options) end alias audit_log_url audit_trail_url end