Created
June 6, 2012 15:30
-
-
Save iHiD/2882651 to your computer and use it in GitHub Desktop.
How to Build A Secure Website With Ruby On Rails 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Authenticate user | |
@user = #... | |
# Destroy the existing session in case anyone is sharing it and | |
# create a new session that you know to be unique to the user. | |
reset_session | |
# Store the user's id as normal | |
session[:user_id] = @user.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment