Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Laden …
In neuem Issue referenzieren