Permalink
Browse files

corrected sample code to clear @_current_user class variable also

  • Loading branch information...
1 parent 7e1f668 commit 23f71c431dae9ec389a861700ea84c7b0cbf913c @rajinder-yadav rajinder-yadav committed Nov 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/action_controller_overview.textile
@@ -239,7 +239,7 @@ class LoginsController < ApplicationController
# "Delete" a login, aka "log the user out"
def destroy
# Remove the user id from the session
- session[:current_user_id] = nil
+ @_current_user = session[:current_user_id] = nil
redirect_to root_url
end
end

0 comments on commit 23f71c4

Please sign in to comment.