Permalink
Browse files

corrected sample code to clear @_current_user class variable also

  • Loading branch information...
1 parent 7487767 commit c41d9813be0104a5ff68e3ec26a22900dbf2b5da @rajinder-yadav rajinder-yadav committed with fxn Nov 14, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/action_controller_overview.textile
@@ -242,7 +242,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 c41d981

Please sign in to comment.