mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-29 02:12:59 +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])
|
@tournament = Tournament.find(params[:tournament])
|
||||||
end
|
end
|
||||||
if @tournament
|
if @tournament
|
||||||
@matches = @tournament.matches.where(mat_id: nil)
|
@matches = @tournament.matches.where(mat_id: nil).limit(10)
|
||||||
@mats = @tournament.mats
|
@mats = @tournament.mats
|
||||||
if @matches.empty?
|
if @tournament.matches.empty?
|
||||||
redirect_to "/static_pages/noMatches?tournament=#{@tournament.id}"
|
redirect_to "/static_pages/noMatches?tournament=#{@tournament.id}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user