ability to share template with testing account

This commit is contained in:
Pete Matsyburka
2024-02-03 22:37:17 +02:00
parent 8630c68631
commit c67188edf8
25 changed files with 454 additions and 206 deletions
+1
View File
@@ -57,6 +57,7 @@ class Template < ApplicationRecord
class_name: 'ActiveStorage::Attachment', dependent: :destroy, as: :record, inverse_of: :record
has_many :submissions, dependent: :destroy
has_many :template_sharings, dependent: :destroy
scope :active, -> { where(archived_at: nil) }
scope :archived, -> { where.not(archived_at: nil) }