Show most recent conference first in conferences#index

This commit is contained in:
Stella Rouzi 2016-06-23 12:24:58 +03:00
parent c49606c815
commit b0ffa683dc

View file

@ -5,7 +5,7 @@ class ConferenceController < ApplicationController
load_resource :program, through: :conference, singleton: true, except: :index
def index
@current = Conference.where('end_date >= ?', Date.current).order('start_date ASC')
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
@antiquated = @conferences - @current
end