Skip to content

Commit

Permalink
working on compatibility between rails 3.0 and 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Fitzgerald committed Jun 22, 2011
1 parent 081f73b commit a0fa74a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mongoid_session_store/mongoid_store.rb
Expand Up @@ -17,7 +17,7 @@ class Session
self.session_class = Session

SESSION_RECORD_KEY = 'rack.session.record'
ENV_SESSION_OPTIONS_KEY = Rack::Session::Abstract::ENV_SESSION_OPTIONS_KEY
ENV_SESSION_OPTIONS_KEY = Rack::Session::Abstract::ENV_SESSION_OPTIONS_KEY if ::Rails.version >= "3.1"

private

Expand Down Expand Up @@ -48,6 +48,10 @@ def find_session(id)
# end
# end

def destroy(env)
destroy_session(env, current_session_id(env), {})
end

def destroy_session(env, session_id, options)
if sid = current_session_id(env)
get_session_model(env, sid).destroy
Expand Down

0 comments on commit a0fa74a

Please sign in to comment.