Created
December 12, 2014 21:43
-
-
Save jmmastey/1e3558b5a488910b76f4 to your computer and use it in GitHub Desktop.
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
def auth_by_token(email, auth_token) | |
user = User.find(email: email) | |
session[:current_user] = user if user && Devise.secure_compare(user.auth_token, auth_token) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment