This commit is contained in:
divyanshumehta 2017-02-12 13:47:32 +05:30
parent c3ac72f0af
commit 1cb51d59ca

View file

@ -7,7 +7,8 @@ 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 if @current.count == 1
redirect_to "/conferences/#{@current.first.id}" # redirect_to "/conferences/#{@current.first.short_title}"
redirect_to conference_path(@current.first.short_title)
end end
@antiquated = @conferences - @current @antiquated = @conferences - @current
end end