adjust submitter edit

This commit is contained in:
Pete Matsyburka
2024-10-08 14:14:24 +03:00
committed by Oleksandr Turchyn
parent e0a297cf81
commit d6474f0e6e
8 changed files with 105 additions and 101 deletions
+2
View File
@@ -56,6 +56,8 @@ class Submitter < ApplicationRecord
has_many :document_generation_events, dependent: :destroy
has_many :submission_events, dependent: :destroy
has_many :start_form_submission_events, -> { where(event_type: :start_form) },
class_name: 'SubmissionEvent', dependent: :destroy, inverse_of: :submitter
scope :completed, -> { where.not(completed_at: nil) }