add expire at

This commit is contained in:
Pete Matsyburka
2024-08-01 16:43:55 +03:00
parent c4a91c2b34
commit 3a2910f717
13 changed files with 93 additions and 16 deletions
+5
View File
@@ -6,6 +6,7 @@
#
# id :bigint not null, primary key
# archived_at :datetime
# expire_at :datetime
# preferences :text not null
# slug :string not null
# source :text not null
@@ -75,6 +76,10 @@ class Submission < ApplicationRecord
preserved: 'preserved'
}, scope: false, prefix: true
def expired?
expire_at && expire_at <= Time.current
end
def audit_trail_url
return if audit_trail.blank?