Hi, first post here.  I'm enjoying getting to know rails.  I have been
scratching my head trying to find a way to modify data in a session by
directly accessing CGI::Session.

I should note, using the following code, I can successfully create a new
key / value pair from the console, but not within my app.  I have tried
both methods below:

def add_session_data(other_sess_id, new_data)
a =
CGI::Session::ActiveRecordStore::Session.find_by_session_id(other_sess_id)
a.data[:test] = new_data
a.save
end

def add_session_data(other_sess_id, new_data)
cgi = CGI.new("html4")
a = CGI::Session.new(cgi, 'database_manager' =>
CGI::Session::ActiveRecordStore, 'session_id' => other_sess_id)
a[:test] = new_data
a.close
end
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to