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 b11001cdba
commit ec804c263f
No known key found for this signature in database
GPG key ID: 1B3951886C449023

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