Added condition to check for existing splashpage. Will redirect user if splashpage is not found.

This commit is contained in:
Marie-Elise 2018-01-13 22:40:42 -06:00
parent fa55224163
commit fd4e8f97b5

View file

@ -20,6 +20,9 @@ class ConferencesController < ApplicationController
authorize! :show, @conference # TODO: reduce the 10 queries performed here
splashpage = @conference.splashpage
if !splashpage.present?
redirect_to admin_conference_splashpage_path(@conference.short_title)
else
if splashpage.include_cfp
cfps = @conference.program.cfps
@call_for_events = cfps.find { |call| call.cfp_type == 'events' }
@ -52,6 +55,7 @@ class ConferencesController < ApplicationController
).order('sponsorship_levels.position ASC', 'sponsors.name')
end
end
end
private