add submitter metadata

This commit is contained in:
Pete Matsyburka committed 2024-02-03 10:29:45 +02:00
1 parent 3781b0aa72
commit 07f0fbb50f
11 files changed
+30 -9

No files matched your search

+3
View File
@@ -8,6 +8,7 @@
# completed_at :datetime
# email :string
# ip :string
# metadata :text not null
# name :string
# opened_at :datetime
# phone :string
@@ -39,10 +40,12 @@ class Submitter < ApplicationRecord
attribute :values, :string, default: -> { {} }
attribute :preferences, :string, default: -> { {} }
attribute :metadata, :string, default: -> { {} }
attribute :slug, :string, default: -> { SecureRandom.base58(14) }
serialize :values, coder: JSON
serialize :preferences, coder: JSON
serialize :metadata, coder: JSON
has_many_attached :documents
has_many_attached :attachments