1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

order up matches by bout_number

This commit is contained in:
2015-10-30 11:28:03 -04:00
parent b7c360ff88
commit 4b78be8214

View File

@@ -9,7 +9,7 @@ class StaticPagesController < ApplicationController
@tournament = Tournament.find(params[:tournament])
end
if @tournament
@matches = @tournament.matches.where(mat_id: nil).limit(10)
@matches = @tournament.matches.where(mat_id: nil).order('bout_number ASC').limit(10)
@mats = @tournament.mats
if @tournament.matches.empty?
redirect_to "/static_pages/noMatches?tournament=#{@tournament.id}"