5
0
Fork 0
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:
f 2021-07-29 10:55:21 -03:00
parent 6b67f13aaf
commit 5d9c379e0e
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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