]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Use session.delete to remove entries instead of assigning nil
[rails.git] / app / controllers / user_controller.rb
index 97b0de73c79fdf4d85676069df17a816a6989fd3..283e11936f55b2b5ec682f7c672e6f863966fcec 100644 (file)
@@ -272,9 +272,9 @@ class UserController < ApplicationController
         if token
           token.destroy
         end
-        session[:token] = nil
+        session.delete(:token)
       end
-      session[:user] = nil
+      session.delete(:user)
       session_expires_automatically
       if params[:referer]
         redirect_to params[:referer]