From cdafffea2b8ed71f69826d76db2720e23e19bc4e Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Wed, 17 Nov 2021 20:15:48 +0530 Subject: [PATCH] use proper structure for preloading category custom fields --- plugin.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index e68f88d8..ce0d7b6f 100644 --- a/plugin.rb +++ b/plugin.rb @@ -116,8 +116,15 @@ after_initialize do load File.expand_path(path, __FILE__) end + # preloaded category custom fields + %w[ + create_topic_wizard + ] + .each do |custom_field| + Site.preloaded_category_custom_fields << custom_field + end + Liquid::Template.register_filter(::CustomWizard::LiquidFilter::FirstNonEmpty) - Site.preloaded_category_custom_fields << "create_topic_wizard" add_class_method(:wizard, :user_requires_completion?) do |user| wizard_result = self.new(user).requires_completion?