This commit is contained in:
divyanshumehta 2017-02-11 16:45:27 +05:30
parent 051e99aca4
commit c3ac72f0af

View file

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