module Authenticable
Add authentication support to a controller
Public Instance Methods
current_user()
click to toggle source
Get user associated with auth token. Overrides devise implementation.
-
Returns :
# File app/controllers/concerns/authenticable.rb, line 10 def current_user @current_user ||= User.find_by(auth_token: header_token) end
user_signed_in?()
click to toggle source
Check for a current user. Overrides device implementation.
# File app/controllers/concerns/authenticable.rb, line 31 def user_signed_in? current_user.present? end