refactor prefill

This commit is contained in:
Pete Matsyburka committed 2026-09-26 15:17:33 +03:00
1 parent 439f95d87e
commit 2d6f4c521e
13 files changed
+247 -128

No files matched your search

+7
View File
@@ -129,6 +129,13 @@ module Submitters
ActiveStorage::Attachment.create!(blob:, name: 'attachments', record: submitter)
end
def build_prefill_attachment_data(submitter, attachment)
token = ApplicationRecord.signed_id_verifier.generate([attachment.uuid, submitter.slug],
purpose: :prefill_attachment)
{ token:, url: attachment.url }
end
def normalize_preferences(account, user, params)
preferences = {}