Sha256: 24f581a1240380831246617f62dca57229ba1b61796f21d0636837faa48ec443
Contents?: true
Size: 877 Bytes
Versions: 1
Compression:
Stored size: 877 Bytes
Contents
require 'securerandom' $:.unshift File.dirname(__FILE__) module MongoSessionStore def self.collection_name=(name) @collection_name = name if defined?(ActionDispatch::Session::MongoStore::Session) ActionDispatch::Session::MongoStore::Session.reset_collection end if defined?(ActionDispatch::Session::MongoMapperStore::Session) ActionDispatch::Session::MongoMapperStore::Session.set_collection_name(name) end if defined?(ActionDispatch::Session::MongoidStore::Session) ActionDispatch::Session::MongoidStore::Session.store_in(name) end end def self.collection_name @collection_name end # default collection name for all the stores self.collection_name = "sessions" end require 'mongo_session_store/mongo_mapper_store' require 'mongo_session_store/mongoid_store' require 'mongo_session_store/mongo_store'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo_session_store-rails3-3.0.1 | lib/mongo_session_store-rails3.rb |