Redirect with multi-dimensional parameter hashes


Is it possible to redirect passing multi dimensional parameters?

I need to send params[:current][:selview] to another action mantaining
the same data structure

if I try as follows:

redirect_to :controller=>“main”,:action=>“inquiry”,{“current”=>{

I receive “syntax error, unexpected ‘\n’, expecting tASSOC”

the same happens if I try


Many thanks in advance for your help


On Aug 27, 5:23 pm, Stefano B. [email protected]


You need to create the magic parameter names that rails interprets as
hashes, so in this case try “current[selview]” => …
Also checkout the to_query method on hash. I’ve also written a blog
post that covers some of this: