From 197970fe707e28d2dd343d1b1d0161a495750775 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:29:51 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20`Neighborhood`:=20Handle=20Activ?= =?UTF-8?q?eRecord::RecordNotFound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/1754 It appears we do not ... do the baseline NotFound handling... Oops. --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) 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