add audit trail

This commit is contained in:
Alex Turchyn
2023-09-10 19:25:57 +03:00
parent 8cabe31827
commit cf6cacdc92
11 changed files with 296 additions and 15 deletions
+2
View File
@@ -41,6 +41,8 @@ class Submission < ApplicationRecord
attribute :source, :string, default: 'link'
attribute :submitters_order, :string, default: 'random'
has_one_attached :audit_trail
has_many :template_schema_documents,
->(e) { where(uuid: (e.template_schema.presence || e.template.schema).pluck('attachment_uuid')) },
through: :template, source: :documents_attachments