I want to grab all the “additional” parameters from a URL and put them in a redirect_to. I won’t know what the parameters are, though.
Example: example.com/books/1234?name=Bobby&uid=3819&gender=male
And I’d want to do something like redirect_to login_path(params)
And it would then redirect to example.com/login?name=Bobby&uid=3819&gender=male
I know I could pass :name, :uid and :gender in the redirect_to, but like I said, I won’t know exactly what parameters will be there, so I just need to grab all of them.
I assume you just want to pass the GET parameters to this redirect. If so, you can do this: