Created
August 24, 2019 01:22
-
-
Save rwehresmann/7c22a7c8afde675fe7789917388f34a9 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 | |
| protect_from_forgery with: :exception | |
| helper_method :current_user | |
| helper_method :current_admin_user | |
| def current_user | |
| @current_user ||= User.find_by(id: session[:user_id]) | |
| end | |
| def current_admin_user | |
| @current_admin_user ||= User.find_by(id: session[:admin_user_id]) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment