diff options
| author | mo khan <mo@mokhan.ca> | 2014-08-12 22:29:14 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-08-12 22:29:14 -0600 |
| commit | 91d13ed2441a95cc8dca9e889d662339bafa198a (patch) | |
| tree | 320a69ecca22995f3ae077ca23bd9b999751211d /app/controllers/application_controller.rb | |
| parent | 537d150e289bed715f8e700ba5f986f3b95a99f4 (diff) | |
try to fix some broken specs.
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 |
