update submission templates

This commit is contained in:
Alex Turchyn
2023-06-03 21:22:03 +03:00
parent b0b4386927
commit 5d6b5ab6d7
10 changed files with 364 additions and 77 deletions
+12
View File
@@ -42,4 +42,16 @@ class Submission < ApplicationRecord
has_many_attached :attachments
scope :active, -> { where(deleted_at: nil) }
def status
if completed_at?
'completed'
elsif opened_at?
'opened'
elsif sent_at?
'sent'
else
'awaiting'
end
end
end