Fix AccessDenied error handler

I don't think people see this very often visually, but it's showing up
in our error logging! The Rails API changed here long ago and we didn't
notice: to render public files, we should use the `file` argument
instead of `template`.
This commit is contained in:
Emi Matchu 2024-02-28 13:20:41 -08:00
parent 09090d53ce
commit d8b3f613e3

View file

@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base
rescue_from AccessDenied, :with => :on_access_denied rescue_from AccessDenied, :with => :on_access_denied
def on_access_denied def on_access_denied
render template: 'public/403.html', :layout => false, :status => :forbidden render file: 'public/403.html', layout: false, status: :forbidden
end end
def redirect_back!(default=:back) def redirect_back!(default=:back)