mongoid3_session_store

Store rails 3.1+ sessions using Mongoid 3.

Installation

This gem supports rails 3.1+ and mongoid 3.0+

N.B. Mongoid 3 requires ruby 1.9.3. See mongoid.org for current requirements.

gem install mongoid3_session_store

Setup

In your Gemfile:

gem 'mongoid', '~> 3.0'
gem "mongoid3_session_store", "~> 1.0.0"

In the session_store initializer (config/initializers/session_store.rb) you can comment out every line as mongoid session store will be setup for use when added to the gemfile.

If you want to be more explicit you can comment out the currently setup store and add:

Example::Application.config.session_store :mongoid_store

Rake Tasks

Mongoid Session Store comes with a rake task to clear out the sessions it stores in mongoDB

rake db:mongoid:sessions:clear

Note on Patches/Pull Requests

  • Fork the project and make your desired changes/fixes on a topic branch.

  • Add tests to prevent future regressions.

  • Please put any changes to Rakefile, version or history in their own isolated commits.

  • Send me a pull request.

Copyright © 2012 Peter Cipollone. Based largely on mongoid_session_store, copyright © 2010 Ryan Fitzgerald. See MIT-LICENSE for details.