Skip to content

Instantly share code, notes, and snippets.

@theRealNG
Created April 28, 2015 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theRealNG/ab4652bda1109517fa6f to your computer and use it in GitHub Desktop.
Save theRealNG/ab4652bda1109517fa6f to your computer and use it in GitHub Desktop.
Over ridding devise current_user to use for the API authentication
def current_user
@current_user ||= User.find_by(auth_token: request.headers["Authorization"])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment