Browse files

implement #destroy_session to be compatible with AbstractStore interface

modified from stipple@f0432b9

a runtime error would occur if something caused a session reset,
as you can see from this gist: https://gist.github.com/2156344
  • Loading branch information...
1 parent 3815965 commit 5a04ccd3c49699ffccd04168ea5247d69ad90ba5 @felideon committed Mar 22, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/redis_session_store.rb
View
6 lib/redis_session_store.rb
@@ -60,6 +60,12 @@ def set_session(env, sid, session_data, options = {})
sid
end
+ def destroy_session(env, sid, session_data)
+ if sid = current_session_id(env)
+ @redis.del(prefixed(sid))
+ end
+ end
+
end
end
end

0 comments on commit 5a04ccd

Please sign in to comment.