I want to redirect the user to a named route but to a different subdomain. I thought that specifying the host as the last param to redirect_to
would do it, but it just doesn't work. Here is the code I am using:
redirect_to(log_in_url(return_to: request.fullpath), host: "https://acme.lvh.me:3000/")
For some reason that doesn't work. Here is a scenario and what's happening:
- I'm on
https://oauth.lvh.me:3000/oauth/authorize
- I use the
redirect_to
method specified above. - It redirects me to
https://oauth.lvh.me:3000/log_in
- It should instead have redirected me to
https://acme.lvh.me:3000/log_in
What am I doing wrong please?