使用redirect_to并传递额外的参数

AnA*_*ice 3 ruby-on-rails ruby-on-rails-3

我正在尝试返回redirect_to并传递额外的参数.这是我在控制器中的内容:

redirect_to(env['omniauth.origin'], :hello => "hello world")
Run Code Online (Sandbox Code Playgroud)

这是正确地重定向到URL但是没有传递hello.想法?

tsh*_*rif 5

env['omniauth.origin']一个字符串?如果是这样,我认为这不起作用.您可以尝试将参数添加为:

redirect_to(env['omniauth.origin'] + "?hello=helloworld")
Run Code Online (Sandbox Code Playgroud)

或者那种效果.