mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Seeds need to be nil before setting seeds
This commit is contained in:
@@ -157,6 +157,7 @@ class Weight < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def setSeeds
|
||||
wrestlers.update_all({seed: nil})
|
||||
wrestlerWithSeeds = wrestlers.select{|w| w.original_seed != nil }.sort_by{|w| w.original_seed}
|
||||
wrestlerWithSeeds.each do |w|
|
||||
w.seed = w.original_seed
|
||||
|
||||
Reference in New Issue
Block a user