I have a major headache. I have a complete set of data from a database table and I have deleted all of the contents from the table, DON'T ASK. I need to recover the data. The data is stored in the session hash and I have to retrieve it. The problem is I cannot find a way to iterate through the session. Trying "session.each do..." doesn't work, neither does "session.keys". Any help out there for a DESPERATE final year student in a bit of a fix. Humbly yours dave.
on 2007-03-07 00:30
on 2007-03-07 17:44
from the console $ script/console >> Marshal.load(Base64.decode64(ActiveRecord::Base.connection.select_one("select * from sessions where session_id = '<your session id here>'")["data"])) it should return a hash of all the data stored in the session. hope that helps
on 2007-03-09 00:26
Chris Hall wrote: You're a superstar Chris. That pulled me out of hole. But of course, that's what the session table holds! Don't know why I didn't see it. Doh! Many many thanks, Dave