Sha256: 0aa49838f0549bc5e4a450574977c5f866f9e6fc653862852f0f99b563719cfe
Contents?: true
Size: 506 Bytes
Versions: 53
Compression:
Stored size: 506 Bytes
Contents
# WARNING - This really only works for development, see README for more details class InMemorySessionStore class EnvironmentError < StandardError; end def self.retrieve(id) repo[id] end def self.store(session) id = SecureRandom.uuid repo[id] = session id end def self.clear @@repo = nil end def self.repo if Rails.env.production? raise EnvironmentError.new("Cannot use InMemorySessionStore in a Production environment") end @@repo ||= {} end end
Version data entries
53 entries across 53 versions & 3 rubygems