Sam Donaldson
2006-Aug-03 10:53 UTC
[Rails] Setting session variables and expiration issue.
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.
--
Posted via http://www.ruby-forum.com/.
