Apply rubocop
Dieser Commit ist enthalten in:
Ursprung
56a1463413
Commit
1a78b44d35
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
class CustomWizard::Submission
|
class CustomWizard::Submission
|
||||||
include ActiveModel::SerializerSupport
|
include ActiveModel::SerializerSupport
|
||||||
|
|
||||||
PAGE_LIMIT = 50
|
PAGE_LIMIT = 50
|
||||||
KEY ||= "submissions"
|
KEY ||= "submissions"
|
||||||
META ||= %w(submitted_at route_to redirect_on_complete redirect_to)
|
META ||= %w(submitted_at route_to redirect_on_complete redirect_to)
|
||||||
|
@ -105,7 +105,7 @@ class CustomWizard::Submission
|
||||||
result = OpenStruct.new(submissions: [], total: nil)
|
result = OpenStruct.new(submissions: [], total: nil)
|
||||||
|
|
||||||
query.each do |record|
|
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|
|
submission_data.each do |data|
|
||||||
result.submissions.push(new(wizard, data, record.key))
|
result.submissions.push(new(wizard, data, record.key))
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe CustomWizard::Submission do
|
||||||
@count = CustomWizard::Submission::PAGE_LIMIT + 20
|
@count = CustomWizard::Submission::PAGE_LIMIT + 20
|
||||||
|
|
||||||
@count.times do |index|
|
@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
|
end
|
||||||
described_class.new(@wizard2, step_1_field_1: "I am another user's submission").save
|
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
|
described_class.new(@wizard3, step_1_field_1: "I am a user submission on another wizard").save
|
||||||
|
|
Laden …
In neuem Issue referenzieren