I can’t work this out.
url = "www.mysite.com/?param1=abc"
redirect_to(url, :param2 => 'xyz')
### Should this go to - www.mysite.com/?param1=abc¶m2=xyz
Or am I missing something? It doesn’t seem to work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the documentation:
You’re passing a String as the first argument, so it’s using the 3rd option. Your second parameter is interpreted as the value for the
response_statusparameter.So, if your redirect is an internal one (to the same app), you don’t need to specify the scheme and hostname. Just use
If it’s an external URL, build the complete URL before redirecting: