Created
August 4, 2019 15:31
-
-
Save anthonygharvey/ae3a0ab5c9fdde7e82ce56052499cc85 to your computer and use it in GitHub Desktop.
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 | |
# other controller actions | |
def current_user | |
@current_user ||= User.find(session[:user_id]) if session[:user_id] | |
end | |
helper_method :current_user | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment