preserve submitter preferences

This commit is contained in:
Pete Matsyburka
2023-11-23 20:03:52 +02:00
parent 514987138a
commit 01333e5b2e
19 changed files with 252 additions and 65 deletions
+4
View File
@@ -6,6 +6,7 @@
#
# id :bigint not null, primary key
# deleted_at :datetime
# preferences :text not null
# slug :string not null
# source :text not null
# submitters_order :string not null
@@ -36,9 +37,12 @@ class Submission < ApplicationRecord
has_many :submitters, dependent: :destroy
has_many :submission_events, dependent: :destroy
attribute :preferences, :string, default: -> { {} }
serialize :template_fields, JSON
serialize :template_schema, JSON
serialize :template_submitters, JSON
serialize :preferences, JSON
attribute :source, :string, default: 'link'
attribute :submitters_order, :string, default: 'random'