mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Show old conferences in descending order
It is more likely that users look for recent conferences. Fixes https://github.com/openSUSE/osem/issues/2331
This commit is contained in:
parent
1544cdd23e
commit
ee50f25d46
1 changed files with 2 additions and 3 deletions
|
|
@ -6,9 +6,8 @@ class ConferencesController < ApplicationController
|
|||
load_and_authorize_resource find_by: :short_title, except: :show
|
||||
|
||||
def index
|
||||
@current, @antiquated = Conference.reorder(start_date: :asc).all.partition do |conference|
|
||||
conference.end_date >= Date.current
|
||||
end
|
||||
@current = Conference.where('end_date >= ?', Date.current).reorder(start_date: :asc)
|
||||
@antiquated = Conference.where('end_date < ?', Date.current)
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue