add expire at

This commit is contained in:
Pete Matsyburka committed 2024-08-01 18:34:09 +03:00
1 parent c4a91c2b34
commit 3a2910f717
13 files changed
+93 -16

No files matched your search

+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?