mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 15:42:32 -05:00
add ability to replace documents
This commit is contained in:
1 parent
e1eb2da6f9
commit
df1d78897a
6 files changed
+154
-30
No files matched your search
@@ -44,6 +44,9 @@ class Template < ApplicationRecord
|
||||
|
||||
has_many_attached :documents
|
||||
|
||||
has_many :schema_documents, ->(e) { where(uuid: e.schema.pluck('attachment_uuid')) },
|
||||
class_name: 'ActiveStorage::Attachment', dependent: :destroy, as: :record, inverse_of: :record
|
||||
|
||||
has_many :submissions, dependent: :destroy
|
||||
|
||||
scope :active, -> { where(deleted_at: nil) }
|
||||
|
||||
Reference in new issue
Block a user