redirect with multi-dimensional parameter hashes

Hi,

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"=>{
"selview"=>params[:current][:selview]}}

I receive "syntax error, unexpected '\n', expecting tASSOC"

the same happens if I try

redirect_to
:controller=>"main",:action=>"inquiry",:current[:selview]=>params[:current][:selview]}}

Many thanks in advance for your help

Stefano

Hi,

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"=>{
"selview"=>params[:current][:selview]}}

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: http://www.spacevatican.org/2008/7/18/parametrised-to-the-max

Fred