add documents preview endpoint

This commit is contained in:
Pete Matsyburka committed 2024-10-15 19:31:24 +03:00
1 parent d9f314898b
commit 3ee41975fd
5 files changed
+167 -21

No files matched your search

+2
View File
@@ -55,6 +55,8 @@ class Submission < ApplicationRecord
has_one_attached :audit_trail
has_one_attached :combined_document
has_many_attached :preview_documents
has_many :template_schema_documents,
->(e) { where(uuid: (e.template_schema.presence || e.template.schema).pluck('attachment_uuid')) },
through: :template, source: :documents_attachments