anonymous / gist:1917678
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

JRuby Monkey patch gist 1

View gist:1917678
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
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.