mongo_session_store icon indicating copy to clipboard operation
mongo_session_store copied to clipboard

#destroy needs to be implemented in Rails 3

Open ciberch opened this issue 14 years ago • 1 comments

I get an exception using this gem with mongoid on Rails 3

actionpack (3.0.10) lib/action_dispatch/middleware/session/abstract_store.rb:252:in destroy' actionpack (3.0.10) lib/action_dispatch/middleware/session/abstract_store.rb:105:indestroy'

Which if you look at: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb

Can see why

def destroy_session(env, sid, options) raise '#destroy_session needs to be implemented.' end

ciberch avatar Oct 04 '11 18:10 ciberch

If you are using Rails 3 I recommend just using https://github.com/titanous/mongo-store

module ActionDispatch module Session class MongoRailsStore < Rack::Session::Mongo def initialize app, options super end end end end

ciberch avatar Oct 04 '11 22:10 ciberch