Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20: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
|
@ -148,6 +148,10 @@ class CustomWizard::Builder
|
|||
end
|
||||
|
||||
final_step = updater.step.next.nil?
|
||||
|
||||
if route_to = data['route_to']
|
||||
data.delete('route_to')
|
||||
end
|
||||
|
||||
if @wizard.save_submissions && updater.errors.empty?
|
||||
save_submissions(data, final_step)
|
||||
|
@ -162,8 +166,8 @@ class CustomWizard::Builder
|
|||
|
||||
if updater.errors.empty?
|
||||
if final_step
|
||||
updater.result[:redirect_on_complete] = data['route_to'] || data['redirect_on_complete']
|
||||
elsif route_to = data['route_to']
|
||||
updater.result[:redirect_on_complete] = route_to || data['redirect_on_complete']
|
||||
elsif
|
||||
updater.result[:redirect_on_next] = route_to
|
||||
end
|
||||
end
|
||||
|
|
Laden …
In neuem Issue referenzieren