mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
adjust email templates
This commit is contained in:
1 parent
43b32d05cb
commit
d53fa5613b
35 files changed
+160
-57
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Submitters
|
||||
module_function
|
||||
|
||||
def select_attachments_for_download(submitter)
|
||||
original_documents = submitter.submission.template.documents.preload(:blob)
|
||||
is_more_than_two_images = original_documents.count(&:image?) > 1
|
||||
|
||||
submitter.documents.preload(:blob).reject do |attachment|
|
||||
is_more_than_two_images && original_documents.find { |a| a.uuid == attachment.uuid }&.image?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user