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,
|
contact_params.to_h.symbolize_keys,
|
||||||
params[:redirect]
|
params[:redirect]
|
||||||
|
|
||||||
redirect_to params[:redirect] || origin.to_s
|
redirect_to params[:redirect] || referer || site.url
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -17,7 +17,7 @@ module Api
|
||||||
site.touch if service.create_anonymous.persisted?
|
site.touch if service.create_anonymous.persisted?
|
||||||
|
|
||||||
# Redirigir a la URL de agradecimiento
|
# Redirigir a la URL de agradecimiento
|
||||||
redirect_to params[:redirect_to] || origin.to_s
|
redirect_to params[:redirect_to] || referer || site.url
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue