From 4c20d6970a0ba1e25ec825d192c8e748df64e74a Mon Sep 17 00:00:00 2001 From: fzngagan Date: Wed, 18 Mar 2020 15:38:59 +0530 Subject: [PATCH] topic custom fields passed to params to be able to consume on topic creation event --- lib/custom_wizard/builder.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/custom_wizard/builder.rb b/lib/custom_wizard/builder.rb index ea8bdc01..fd1fc35f 100644 --- a/lib/custom_wizard/builder.rb +++ b/lib/custom_wizard/builder.rb @@ -407,12 +407,11 @@ class CustomWizard::Builder custom_key = keyArr.last type = keyArr.first - if type === 'topic' - topic_custom_fields[custom_key] = value - elsif type === 'post' + topic_custom_fields[custom_key] = value if type === 'topic' + params[:custom_fields] ||= {} params[:custom_fields][custom_key.to_sym] = value - end + end else value = [*value] + tags if key === 'tags'