lib/action_dispatch/middleware/session/sequel_store.rb in sequel-rails-0.9.5 vs lib/action_dispatch/middleware/session/sequel_store.rb in sequel-rails-0.9.6
- old
+ new
@@ -35,10 +35,11 @@
end
def destroy_session(env, sid, options)
sid = current_session_id(env)
if sid
- get_session_model(env, sid).destroy
+ session = get_session_model(env, sid)
+ session.destroy unless session.new?
env[SESSION_RECORD_KEY] = nil
end
generate_sid unless options[:drop]
end