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
parent 137d997793
commit fc146a1371
No known key found for this signature in database
GPG key ID: 1B3951886C449023
5 changed files with 41 additions and 2 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