This file contains 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
class ApplicationController < ActionController::Base | |
# ... | |
private | |
# from https://gist.github.com/josevalim/fb706b1e933ef01e4fb6 | |
def authenticate_user_from_token! | |
email = params[:email].presence | |
user = email && User.where(email: email).first |