Smart Session Store plugin

Plugin details

A session store that avoids the pitfalls usually associated with concurrent access to the session

Websitehttp://www.texperts.com/2007/05/01/race-conditions-in-rails-sessions-and-how-to-fix-them/ Repositoryhttp://svn1.hosted-projects.com/fcheung/smart_session_store/trunk/ Author Frederick Cheung Tags session LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://svn1.hosted-projects.com/fcheung/smart_session_store/trunk/

Step 1
======

Generate your sessions table using rake db:sessions:create

Step 2
======
Add the code below after the initializer config section:

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.
  update(:database_manager => SmartSessionStore)


Finally, depending on your database type, add

SmartSessionStore.session_class = MysqlSession
#or
SmartSessionStore.session_class = PostgresqlSession
#or
SmartSessionStore.session_class = OracleSession



after the initializer section in environment.rb

Step 3 (optional)
==============
If you want to use a database separate from your default one to store your sessions, specify a configuration in your database.yml file (say sessions), and establish the connection on SqlSession in environment.rb:

SqlSession.establish_connection :sessions


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: hardway, about 1 year ago