diff options
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c641cb7d..e7a67ae0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -24,4 +24,8 @@ class ApplicationController < ActionController::Base @session = Session.find_by(id: cookies.signed[:cookie_monster]) redirect_to new_session_path unless @session end + + def current_user + @session.try(:user) + end end |
