diff options
| author | mo khan <mo@mokhan.ca> | 2014-04-09 21:53:46 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-04-09 21:53:46 -0600 |
| commit | cd27ffa4fd97d02463b097f8a68a53c5b3c7f5a8 (patch) | |
| tree | 2c05b69223b2d3a0e12b23b4ad97fcca38eba35f /app/controllers/application_controller.rb | |
| parent | 15dc7e8f6af0afa05913eb3648a5b03c16b1db25 (diff) | |
redirect to login when not signed in.
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 953132b..d2b2e9f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -16,9 +16,9 @@ class ApplicationController < ActionController::Base def ensure_valid_session unless session[:session_id] && @current_session = Session.find(session[:session_id]) - render nothing: true, status: :unauthorized + redirect_to new_login_path end rescue ActiveRecord::RecordNotFound - render nothing: true, status: :unauthorized + redirect_to new_login_path end end |
