Last active
November 26, 2016 14:25
-
-
Save nickpoorman/cbd39734fbdcc66049a69d5309844045 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
# app/controllers/application_controller.rb | |
class ApplicationController < ActionController::API | |
include Pundit | |
# set current_user from token | |
include DeviseTokenAuth::Concerns::SetUserByToken | |
# For this example we will stub out `current_user` | |
# For Pundit, you may want to override `pundit_user` | |
def current_user | |
User.find(1) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment