add preserve submitters order option
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
# id :bigint not null, primary key
|
||||
# deleted_at :datetime
|
||||
# source :text not null
|
||||
# submitters_order :string not null
|
||||
# template_fields :text
|
||||
# template_schema :text
|
||||
# template_submitters :text
|
||||
@@ -37,6 +38,7 @@ class Submission < ApplicationRecord
|
||||
serialize :template_submitters, JSON
|
||||
|
||||
attribute :source, :string, default: 'link'
|
||||
attribute :submitters_order, :string, default: 'random'
|
||||
|
||||
has_many :template_schema_documents,
|
||||
->(e) { where(uuid: (e.template_schema.presence || e.template.schema).pluck('attachment_uuid')) },
|
||||
@@ -50,4 +52,9 @@ class Submission < ApplicationRecord
|
||||
embed: 'embed',
|
||||
link: 'link'
|
||||
}, scope: false, prefix: true
|
||||
|
||||
enum :submitters_order, {
|
||||
random: 'random',
|
||||
preserved: 'preserved'
|
||||
}, scope: false, prefix: true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user