From 1a78b44d35fa35b0192d5c72093d95817e172003 Mon Sep 17 00:00:00 2001 From: angusmcleod Date: Wed, 14 Jul 2021 14:06:54 +0800 Subject: [PATCH] Apply rubocop --- lib/custom_wizard/submission.rb | 4 ++-- spec/components/custom_wizard/submission_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/custom_wizard/submission.rb b/lib/custom_wizard/submission.rb index 95b4f7fa..618a9a67 100644 --- a/lib/custom_wizard/submission.rb +++ b/lib/custom_wizard/submission.rb @@ -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 diff --git a/spec/components/custom_wizard/submission_spec.rb b/spec/components/custom_wizard/submission_spec.rb index ce9756d1..fd7e8984 100644 --- a/spec/components/custom_wizard/submission_spec.rb +++ b/spec/components/custom_wizard/submission_spec.rb @@ -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