Guys, this is definitely not working in Rails and other people have gotten gsub errors for this. Can somebody tell me how to safely store the value into the cookie as a string and then retrieve that value back into a Hash?
Of course it won't work. Even if it let you set the value, when you
later retrieve the cookie it's just a string, and you can't convert it
back into a hash. Just marshal it then base64 encode it, then
decode/unmarshal it when you read it back. Not that I suggest doing
that, I think it's crazy, but it will work.