1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 04:35:26 +00:00

See bracket size from tournament view.

This commit is contained in:
2015-02-06 09:08:37 -05:00
parent bf012939a6
commit 3eff0ed0fa
2 changed files with 8 additions and 1 deletions

View File

@@ -2,7 +2,7 @@ class Weight < ActiveRecord::Base
belongs_to :tournament
has_many :wrestlers, dependent: :destroy
attr_accessor :pools
attr_accessor :pools, :bracket_size
def generatePool
@wrestlers = Wrestler.where(weight_id: self.id)
@@ -29,5 +29,10 @@ class Weight < ActiveRecord::Base
end
end
def bracket_size
@wrestlers = Wrestler.where(weight_id: self.id)
return @wrestlers.size
end
end