Class: ActionController::Session::MongoidStore

Inherits:
AbstractStore
  • Object
show all
Defined in:
lib/mongo_session_store/mongoid.rb

Defined Under Namespace

Classes: Session

Constant Summary collapse

SESSION_RECORD_KEY =
'rack.session.record'.freeze

Instance Method Summary collapse

Instance Method Details

#destroy(env) ⇒ Object



21
22
23
24
25
# File 'lib/mongo_session_store/mongoid.rb', line 21

def destroy(env)
  session = @@session_class.first(:conditions => { :_id => env[SESSION_RECORD_KEY].id })
  session.destroy
  env[SESSION_RECORD_KEY] = nil
end