Skip to content

Commit

Permalink
implement #destroy_session to be compatible with AbstractStore interface
Browse files Browse the repository at this point in the history
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
Felipe Delgado committed Mar 22, 2012
1 parent 3815965 commit 5a04ccd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/redis_session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.