Added when only one conference root path goes to show page

This commit is contained in:
alator21 2017-10-22 14:41:28 +03:00
parent 885ebc4186
commit 88f33728db

View file

@ -208,6 +208,11 @@ Osem::Application.routes.draw do
end
get '/admin' => redirect('/admin/conferences')
root to: 'conferences#index', via: [:get, :options]
if Conference.all.count == 1 && Conference.first.splashpage
conference_title=Conference.first.short_title
root to: 'conferences#show',id: conference_title
else
root to: 'conferences#index', via: [:get, :options]
end
end