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.
This commit is contained in:
James Mason 2018-10-18 19:02:54 -07:00
parent 8271250b5d
commit 2785c3ab6d

View file

@ -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