From 153435950aa5b34642541d6ac1ca72cb6cc4e0fe Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 20 Jun 2024 09:38:37 +0200 Subject: [PATCH] DEV: handle add_to_serializer deprecations --- plugin.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin.rb b/plugin.rb index 332285dd..db0dd9be 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.6.10 +# version: 2.6.11 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech @@ -185,17 +185,17 @@ after_initialize do end end - add_to_serializer(:site, :include_wizard_required?) do + add_to_class(:site_serializer, :include_wizard_required?) do scope.is_admin? && Wizard.new(scope.user).requires_completion? end - add_to_serializer(:site, :complete_custom_wizard) do + add_to_class(:site_serializer, :complete_custom_wizard) do if scope.user && requires_completion = CustomWizard::Wizard.prompt_completion(scope.user) requires_completion.map { |w| { name: w[:name], url: "/w/#{w[:id]}" } } end end - add_to_serializer(:site, :include_complete_custom_wizard?) do + add_to_class(:site_serializer, :include_complete_custom_wizard?) do complete_custom_wizard.present? end