mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-02 13:15:27 +00:00
Using eager loading in GenerateTournamentMatches and AdvanceWrestler, generating/manipulating in-memory, and doing a single bulk insert or update at the end.
This commit is contained in:
@@ -156,7 +156,7 @@ class Weight < ApplicationRecord
|
||||
end
|
||||
|
||||
def calculate_bracket_size
|
||||
num_wrestlers = wrestlers.reload.size
|
||||
num_wrestlers = wrestlers.size
|
||||
return nil if num_wrestlers <= 0 # Handle invalid input
|
||||
|
||||
# Find the smallest power of 2 greater than or equal to num_wrestlers
|
||||
|
||||
Reference in New Issue
Block a user