From 9738cdcf8f715e6b758010527befb0602f5277f4 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 23 Feb 2024 02:15:33 +0200 Subject: [PATCH] fix preview page images --- app/controllers/preview_document_page_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/preview_document_page_controller.rb b/app/controllers/preview_document_page_controller.rb index cfee948a..271d6169 100644 --- a/app/controllers/preview_document_page_controller.rb +++ b/app/controllers/preview_document_page_controller.rb @@ -8,7 +8,7 @@ class PreviewDocumentPageController < ActionController::API def show attachment_uuid = ApplicationRecord.signed_id_verifier.verified(params[:signed_uuid], purpose: :attachment) - attachment = ActiveStorage::Attachment.find_by(uuid: attachment_uuid, name: :preview_images) if attachment_uuid + attachment = ActiveStorage::Attachment.find_by(uuid: attachment_uuid) if attachment_uuid return head :not_found unless attachment