mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
add dynamic documents to template response
This commit is contained in:
1 parent
9558060bde
commit
b8ab01c46c
4 files changed
+77
-29
No files matched your search
@@ -28,6 +28,12 @@ class DynamicDocument < ApplicationRecord
|
||||
|
||||
has_many :versions, class_name: 'DynamicDocumentVersion', dependent: :destroy
|
||||
|
||||
has_one :current_version, class_name: 'DynamicDocumentVersion',
|
||||
primary_key: %i[id sha1],
|
||||
foreign_key: %i[dynamic_document_id sha1],
|
||||
dependent: :destroy,
|
||||
inverse_of: :dynamic_document
|
||||
|
||||
attribute :fields, :json
|
||||
|
||||
before_validation :set_sha1
|
||||
|
||||
Reference in new issue
Block a user