# This patch makes Rails 3 use symbols as storage keys in sessions, # as Rails 2 did. module Rack module Session module Abstract class SessionHash def [](key) load_for_read! super(key.to_sym) end def has_key?(key) load_for_read! super(key.to_sym) end def []=(key, value) load_for_write! super(key.to_sym, value) end def delete(key) load_for_write! super(key.to_sym) end private def stringify_keys(other) hash = {} other.each do |key, value| hash[key.to_sym] = value end hash end end end end end