source: subversion/sites/rails_port/app/models/session.rb @ 4144

Last change on this file since 4144 was 4064, checked in by tomhughes, 13 years ago

Add a model for sessions.

File size: 148 bytes
Line 
1class Session < ActiveRecord::Base
2  def [](key)
3    @data = Marshal.load(Base64.decode64(self.data)) unless @data
4
5    return @data[key]
6  end
7end
Note: See TracBrowser for help on using the repository browser.