1
0
Fork 0
Dieser Commit ist enthalten in:
angusmcleod 2021-06-23 16:15:17 +10:00
Ursprung e441588aa3
Commit 098e8418fb
4 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -23,7 +23,7 @@ class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
content_type: "application/json", content_type: "application/json",
disposition: "attachment" disposition: "attachment"
end end
protected protected
def ordered_submissions def ordered_submissions

Datei anzeigen

@ -1,3 +1,4 @@
# frozen_string_literal: true
class CustomWizard::Submission class CustomWizard::Submission
include ActiveModel::SerializerSupport include ActiveModel::SerializerSupport
@ -23,7 +24,7 @@ class CustomWizard::Submission
if user_id if user_id
@user = User.find_by(id: user_id) @user = User.find_by(id: user_id)
else else
@user = wizard.user @user = wizard.user
end end
data = data.with_indifferent_access data = data.with_indifferent_access
@ -113,4 +114,4 @@ class CustomWizard::Submission
result result
end end
end end

Datei anzeigen

@ -13,4 +13,4 @@ class CustomWizard::SubmissionSerializer < ApplicationSerializer
object.user.username : object.user.username :
I18n.t('admin.wizard.submission.no_user', user_id: object.user_id) I18n.t('admin.wizard.submission.no_user', user_id: object.user_id)
end end
end end

Datei anzeigen

@ -40,4 +40,4 @@ describe CustomWizard::Submission do
it "list submissions by wizard and user" do it "list submissions by wizard and user" do
expect(described_class.list(@wizard, user_id: user.id).size).to eq(1) expect(described_class.list(@wizard, user_id: user.id).size).to eq(1)
end end
end end