0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-16 13:51:12 +02:00

DEV: use of as_json without only no longer allowed

See https://meta.discourse.org/t/preventing-accidental-serialization-of-activerecord-models/314495
Dieser Commit ist enthalten in:
Angus McLeod 2024-07-02 11:59:11 +02:00
Ursprung 5deff6c640
Commit 247a3d551c
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -173,7 +173,7 @@ describe CustomWizard::Action do
steps = wizard.steps
wizard.create_updater(steps[0].id, {}).update
wizard.create_updater(steps[1].id,
step_2_field_7: upload.as_json
step_2_field_7: upload.as_json(only: [:id, :url, :user_id])
).update
expect(user.profile_background_upload.id).to eq(upload.id)
end

Datei anzeigen

@ -230,7 +230,9 @@ describe CustomWizard::Wizard do
before do
enable_subscription("standard")
@wizard.restart_on_revisit = true
CustomWizard::Template.save(@wizard.as_json)
CustomWizard::Template.save(
CustomWizard::WizardSerializer.new(@wizard, root: false).as_json
)
end
it "returns to step 1 if option to clear submissions on each visit is set" do