mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
extracted wrestlers_for_pool method
removed unnecessary select
This commit is contained in:
@@ -8,6 +8,10 @@ class Weight < ActiveRecord::Base
|
||||
self.tournament.destroyAllMatches
|
||||
end
|
||||
|
||||
def wrestlers_for_pool(pool)
|
||||
wrestlers.select{|w| w.generatePoolNumber == pool}.to_a
|
||||
end
|
||||
|
||||
def pools
|
||||
@wrestlers = self.wrestlers
|
||||
if @wrestlers.size <= 6
|
||||
|
||||
Reference in New Issue
Block a user