Sam Donaldson
2006-Aug-03 10:34 UTC
[Rails] setting a session variable, :value and :session_path
Hello,
I''m having some difficulty with using sessions. Basically,
I''d like to be
able to store a hash in an action:
def action
session[:details] = {:value => some_hash, :session_path =>
"/main"}
end
I''d like to be able to retrieve the hash in another action under the
same
"main" controller. I retrieve it by doing the following:
def action2
hash = session[:details]
v1 = hash[:name] # Problem is that this is null
end
I''m not able to get my values out as I expect. Any help would be
appreciated. Also, when I set :session_path => ''/main'',
does this mean that
the session[:details] will get nulled if a user were to get out of the
"main" controller path?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060803/612ad972/attachment.html
