Use session.delete to remove entries instead of assigning nil
[rails.git] / app / controllers / application_controller.rb
index 122349a..1d3297d 100644 (file)
@@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
       @user = User.find(session[:user], :conditions => {:status => ["active", "confirmed", "suspended"]})
 
       if @user.status == "suspended"
-        session[:user] = nil
+        session.delete(:user)
         session_expires_automatically
 
         redirect_to :controller => "user", :action => "suspended"