Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-23 01:40:29 +01:00
Properly clean up route_to after it's used
Dieser Commit ist enthalten in:
Ursprung
f4a5b49446
Commit
b779642422
1 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
|
@ -149,6 +149,10 @@ class CustomWizard::Builder
|
||||||
|
|
||||||
final_step = updater.step.next.nil?
|
final_step = updater.step.next.nil?
|
||||||
|
|
||||||
|
if route_to = data['route_to']
|
||||||
|
data.delete('route_to')
|
||||||
|
end
|
||||||
|
|
||||||
if @wizard.save_submissions && updater.errors.empty?
|
if @wizard.save_submissions && updater.errors.empty?
|
||||||
save_submissions(data, final_step)
|
save_submissions(data, final_step)
|
||||||
elsif final_step
|
elsif final_step
|
||||||
|
@ -162,8 +166,8 @@ class CustomWizard::Builder
|
||||||
|
|
||||||
if updater.errors.empty?
|
if updater.errors.empty?
|
||||||
if final_step
|
if final_step
|
||||||
updater.result[:redirect_on_complete] = data['route_to'] || data['redirect_on_complete']
|
updater.result[:redirect_on_complete] = route_to || data['redirect_on_complete']
|
||||||
elsif route_to = data['route_to']
|
elsif
|
||||||
updater.result[:redirect_on_next] = route_to
|
updater.result[:redirect_on_next] = route_to
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren