1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-05 22:21:26 +00:00

Fixed a number of N+1 issues on low traffic pages. I also added relevant html tests for these pages.

This commit is contained in:
2026-02-17 22:27:11 -05:00
parent d359be3ea1
commit 8670ce38c3
16 changed files with 330 additions and 103 deletions

View File

@@ -1,11 +1,11 @@
class StaticPagesController < ApplicationController
def my_tournaments
tournaments_created = current_user.tournaments
tournaments_delegated = current_user.delegated_tournaments
tournaments_created = current_user.tournaments.to_a
tournaments_delegated = current_user.delegated_tournaments.to_a
all_tournaments = tournaments_created + tournaments_delegated
@tournaments = all_tournaments.sort_by{|t| t.days_until_start}
@schools = current_user.delegated_schools
@schools = current_user.delegated_schools.includes(:tournament)
end
def not_allowed