Sort contests showing most recently created first
This commit is contained in:
@@ -10,7 +10,7 @@ class ContestsController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
authorize :contest
|
authorize :contest
|
||||||
|
|
||||||
@contests = current_user.contests.includes([ :contestants, puzzles: [ :image_attachment ] ])
|
@contests = current_user.contests.includes([ :contestants, puzzles: [ :image_attachment ] ]).order(created_at: :desc)
|
||||||
@title = I18n.t("contests.index.title", username: current_user.username)
|
@title = I18n.t("contests.index.title", username: current_user.username)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user