Skip to content

anonymous /gist:1917678
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JRuby Monkey patch gist 1
module MongoSessionStore
def self.collection_name=(name)
@collection_name = name
if defined?(MongoStore::Session)
MongoStore::Session.reset_collection
end
if defined?(MongoMapperStore::Session)
MongoMapperStore::Session.set_collection_name(name)
end
if defined?(MongoidStore::Session)
MongoidStore::Session.store_in(name)
end
end
# default collection name for all the stores
self.collection_name = "sessions"
end
autoload :MongoMapperStore, 'mongo_session_store/mongo_mapper_store'
autoload :MongoidStore, 'mongo_session_store/mongoid_store'
autoload :MongoStore, 'mongo_session_store/mongo_store'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.