Forum: Ruby on Rails redirect_to and complex values

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 John Wells (Guest)
on 2006-02-07 18:04
(Received via mailing list)
Guys,

I have a number of actions that need to redirect to the user (as opposed
to render) to an action so that a refresh won't report the data.
However, these actions also need to pass a hash to the targeted actions
in the redirect.

Trying to do this with redirect_to paramters converts the Hash to a
String, which won't work for me. For example:

redirect_to(:action=>'do_something', :results=>{"Command"=>"x",
"Result"=>"y")

The redirect converts :results to a String, rather than a Hash. I
suppose it's something to do with the way the data is being passed along
the redirect via url.

Anyway, what's the idiomatic way of handling this? Should I store the
Hash in the session?

Thanks!
John
This topic is locked and can not be replied to.