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. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 3/6/07, Dave Miles <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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. > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---