From 565e175f79181847ec2e814b81b959a30f341fd7 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 7 Apr 2020 21:17:20 +1000 Subject: [PATCH] Tags bugfix --- lib/custom_wizard/actions.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/custom_wizard/actions.rb b/lib/custom_wizard/actions.rb index 732e37b6..0cadfcfa 100644 --- a/lib/custom_wizard/actions.rb +++ b/lib/custom_wizard/actions.rb @@ -28,7 +28,7 @@ class CustomWizard::Action creator = PostCreator.new(user, params) post = creator.create - + if creator.errors.present? updater.errors.add(:create_topic, creator.errors.full_messages.join(" ")) elsif action['skip_redirect'].blank? @@ -200,13 +200,11 @@ class CustomWizard::Action data: data, user: user, ).perform - + if output.is_a?(Array) output.flatten - elsif output.is_a?(Integer) + else output.is_a?(String) [*output] - elsif output.is_a?(String) - [*output.to_i] end end