Allow root URL to redirect to a conference via ENV var.

This commit is contained in:
James Mason 2018-03-03 21:36:20 -08:00 committed by Henne Vogelsang
parent f062f7f4ee
commit 73c5c3c97a
5 changed files with 40 additions and 1 deletions

View file

@ -214,5 +214,9 @@ Osem::Application.routes.draw do
get '/admin' => redirect('/admin/conferences')
root to: 'conferences#index', via: [:get, :options]
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
else
root to: 'conferences#index', via: [:get, :options]
end
end