Class

Session

Extends:

  • Expose the CGI instance to session stores.
  • Don’t require ‘digest/md5’ whenever a new session id is generated.
Classes
ActiveRecordStore A session store backed by an Active Record class. A default class is provided, but any object duck-typing to an Active Record Session class with text session_id and data attributes is sufficient.
CookieStore This cookie-based session store is the Rails default. Sessions typically contain at most a user_id and flash message; both fit within the 4K cookie size limit. Cookie-based sessions are dramatically faster than the alternatives.
DRbStore
MemCacheStore MemCache-based session storage class.
PStore
Aliases
initialize_without_cgi_reader
Public Attributes
cgi Make the CGI instance available to session stores.
data
dbman
Public Methods
generate_unique_id Generate a 32-character unique id using SecureRandom. This is used to generate session ids but may be reused elsewhere.
generate_unique_id Generate an 32-character unique id based on a hash of the current time, a random number, the process id, and a constant string. This is used to generate session ids but may be reused elsewhere.
model Return this session’s underlying Session instance. Useful for the DB-backed session stores.
new
Private Methods
create_new_id Create a new session id.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.