diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3fa3d5e..1d70ea6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -15,6 +15,18 @@ class ApplicationController < ActionController::Base devise_parameter_sanitizer.permit(:account_update, keys: [:notifications_enabled, :locale]) end + def after_sign_in_path_for(_resource) + checks_path + end + + def after_sign_up_path_for(_resource) + checks_path + end + + def after_sign_out_path_for(_resource) + root_path + end + def user_not_authorized flash[:alert] = I18n.t("user_not_authorized", scope: :flashes) redirect_to(request.referrer || root_path) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index d0c1067..8c5d170 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -2,5 +2,7 @@ # License: GNU AGPL-3+ (see full text in LICENSE file) class PagesController < ApplicationController - def home; end + def home + redirect_to checks_path if user_signed_in? + end end diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 4da000b..f4ba67b 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -2,7 +2,7 @@ <% # License: GNU AGPL-3+ (see full text in LICENSE file) %>