]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Expire diary pages which contain comments by a user when necessary
[rails.git] / app / controllers / user_controller.rb
index fcf6526eb0eb1db8c91f6c4a0dd7ea2706679585..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]
@@ -522,6 +522,6 @@ private
     # this is necessary otherwise going to the user terms page, when 
     # having not agreed already would cause an infinite redirect loop.
     # it's .now so that this doesn't propagate to other pages.
-    flash.now[:showing_terms] = true
+    flash.now[:skip_terms] = true
   end
 end