From 2785c3ab6db706f7f455fb908de7468506ffac54 Mon Sep 17 00:00:00 2001 From: James Mason Date: Thu, 18 Oct 2018 19:02:54 -0700 Subject: [PATCH] Raise handled error when conference not found The current codebase will end in a 500 APPLICATION ERROR if Conference#short_title isn't found... this should be a 404 NOT FOUND INSTEAD, which will be handled if we raise ActiveRecord::RecordNotFound. --- app/controllers/conferences_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index d068083b..05f98d6d 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -19,7 +19,7 @@ class ConferencesController < ApplicationController :registration_period, :contact, venue: :commercial - ).find_by(conference_finder_conditions) + ).find_by!(conference_finder_conditions) authorize! :show, @conference # TODO: reduce the 10 queries performed here splashpage = @conference.splashpage