Created
April 8, 2016 04:48
-
-
Save BenMorganIO/2231b6bd84c0811020a92feb9781986b 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
| class ApplicationController < ActionController::Base | |
| before_action :authenticate_user! | |
| private | |
| def authenticate_user! | |
| token = params[:token].presence | |
| @current_user = User.find_by(token: token) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment