mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 05:16:22 +00:00
Volver al referer o al sitio después de enviar formularios
This commit is contained in:
parent
6b67f13aaf
commit
5d9c379e0e
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ module Api
|
|||
contact_params.to_h.symbolize_keys,
|
||||
params[:redirect]
|
||||
|
||||
redirect_to params[:redirect] || origin.to_s
|
||||
redirect_to params[:redirect] || referer || site.url
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -17,7 +17,7 @@ module Api
|
|||
site.touch if service.create_anonymous.persisted?
|
||||
|
||||
# Redirigir a la URL de agradecimiento
|
||||
redirect_to params[:redirect_to] || origin.to_s
|
||||
redirect_to params[:redirect_to] || referer || site.url
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue