Implement offline POST method for starting an offline participation
Some checks failed
CI / scan_ruby (push) Successful in 17s
CI / scan_js (push) Successful in 14s
CI / lint (push) Failing after 15s
CI / test (push) Successful in 42s

This commit is contained in:
sto
2025-10-30 11:37:20 +01:00
parent aea001cdf6
commit 37a65526e4
12 changed files with 94 additions and 25 deletions

View File

@@ -30,8 +30,12 @@ class ApplicationController < ActionController::Base
def user_not_authorized(exception)
policy_name = exception.policy.class.to_s.underscore
flash[:error] = t "#{policy_name}.#{exception.query}", scope: "pundit", default: :default
redirect_back_or_to(root_path)
if current_user
flash[:error] = t "#{policy_name}.#{exception.query}", scope: "pundit", default: :default
redirect_back_or_to(root_path)
else
not_found
end
end
def not_found