Redirect home to conference#show if only one conference live tommorow
This commit is contained in:
parent
ee7684d845
commit
d425349bdd
3 changed files with 4 additions and 7 deletions
|
|
@ -13,6 +13,7 @@ class ConferencesController < ApplicationController
|
|||
|
||||
def current
|
||||
current = Conference.where('start_date <= ? AND end_date >= ?', Date.current, Date.current).first
|
||||
current = Conference.where('start_date = ?', Date.current + 1).first if current.blank?
|
||||
redirect_to conference_path(current.short_title)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue