1
0
Fork 0
Dieser Commit ist enthalten in:
angusmcleod 2021-07-14 14:06:54 +08:00
Ursprung 56a1463413
Commit 1a78b44d35
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true
class CustomWizard::Submission
include ActiveModel::SerializerSupport
PAGE_LIMIT = 50
KEY ||= "submissions"
META ||= %w(submitted_at route_to redirect_on_complete redirect_to)
@ -105,7 +105,7 @@ class CustomWizard::Submission
result = OpenStruct.new(submissions: [], total: nil)
query.each do |record|
if (submission_data = ::JSON.parse(record.value)).any?
if (submission_data = ::JSON.parse(record.value)).any?
submission_data.each do |data|
result.submissions.push(new(wizard, data, record.key))
end

Datei anzeigen

@ -24,7 +24,7 @@ describe CustomWizard::Submission do
@count = CustomWizard::Submission::PAGE_LIMIT + 20
@count.times do |index|
described_class.new(@wizard, step_1_field_1: "I am user submission #{index+1}").save
described_class.new(@wizard, step_1_field_1: "I am user submission #{index + 1}").save
end
described_class.new(@wizard2, step_1_field_1: "I am another user's submission").save
described_class.new(@wizard3, step_1_field_1: "I am a user submission on another wizard").save