mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-31 19:45:45 +00:00
Limit to 10 upcoming matches on up_matches
This commit is contained in:
@@ -9,9 +9,9 @@ class StaticPagesController < ApplicationController
|
||||
@tournament = Tournament.find(params[:tournament])
|
||||
end
|
||||
if @tournament
|
||||
@matches = @tournament.matches.where(mat_id: nil)
|
||||
@matches = @tournament.matches.where(mat_id: nil).limit(10)
|
||||
@mats = @tournament.mats
|
||||
if @matches.empty?
|
||||
if @tournament.matches.empty?
|
||||
redirect_to "/static_pages/noMatches?tournament=#{@tournament.id}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user