1
0
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:
2016-01-20 14:32:23 +00:00
parent 2657f4a835
commit 1401dbea98

View File

@@ -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