diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fbdc06365..6f45284fc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,6 +6,8 @@ class ApplicationController < ActionController::Base before_action :enforce_ssl before_action :ensure_on_byo_domain + rescue_from ActiveRecord::RecordNotFound, with: :render_not_found + include Pundit::Authorization after_action :verify_authorized, except: [:index] # rubocop:disable Rails/LexicallyScopedActionFilter after_action :verify_policy_scoped