diff options
| author | mo khan <mo@mokhan.ca> | 2014-08-12 22:09:38 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-08-12 22:09:38 -0600 |
| commit | 537d150e289bed715f8e700ba5f986f3b95a99f4 (patch) | |
| tree | f69d5fb8bc2090eef189b692f4230f8a83b72850 /app/controllers/application_controller.rb | |
| parent | 8ceb8f9fba1191282d8db777991d70fd8f004325 (diff) | |
update all authentication to use the new authenticate before_filter.
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7fdd48e9..c641cb7d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,4 +19,9 @@ class ApplicationController < ActionController::Base @newest_members = User.order(:created_at => :desc).limit(3) @top_members = User.order(:creations_count => :desc).limit(3) end + + def authenticate! + @session = Session.find_by(id: cookies.signed[:cookie_monster]) + redirect_to new_session_path unless @session + end end |
