From 4b78be8214e259b158d61adf07585e580476dc1f Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Fri, 30 Oct 2015 11:28:03 -0400 Subject: [PATCH] order up matches by bout_number --- app/controllers/static_pages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index 9bdb45f..ac01361 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -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}"