0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00
Dieser Commit ist enthalten in:
Angus McLeod 2020-04-07 21:17:20 +10:00
Ursprung 6ced0cf13c
Commit 565e175f79

Datei anzeigen

@ -28,7 +28,7 @@ class CustomWizard::Action
creator = PostCreator.new(user, params) creator = PostCreator.new(user, params)
post = creator.create post = creator.create
if creator.errors.present? if creator.errors.present?
updater.errors.add(:create_topic, creator.errors.full_messages.join(" ")) updater.errors.add(:create_topic, creator.errors.full_messages.join(" "))
elsif action['skip_redirect'].blank? elsif action['skip_redirect'].blank?
@ -200,13 +200,11 @@ class CustomWizard::Action
data: data, data: data,
user: user, user: user,
).perform ).perform
if output.is_a?(Array) if output.is_a?(Array)
output.flatten output.flatten
elsif output.is_a?(Integer) else output.is_a?(String)
[*output] [*output]
elsif output.is_a?(String)
[*output.to_i]
end end
end end