This commit is contained in:
Divyanshu Mehta 2017-05-27 12:03:52 +00:00 committed by GitHub
commit 664ca790d7

View file

@ -6,6 +6,10 @@ class ConferencesController < ApplicationController
def index
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
if @current.count == 1
# redirect_to "/conferences/#{@current.first.short_title}"
redirect_to conference_path(@current.first.short_title)
end
@antiquated = @conferences - @current
end