mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-17 13:24:36 +00:00
Added weight_max to matchup
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
class Matchup
|
||||
attr_accessor :w1, :w2, :round, :weight_id, :boutNumber, :w1_name, :w2_name, :bracket_position, :bracket_position_number
|
||||
attr_accessor :w1, :w2, :round, :weight_id, :boutNumber, :w1_name, :w2_name, :bracket_position, :bracket_position_number, :weight_max
|
||||
|
||||
def weight_max
|
||||
@weight = Weight.find(self.weight_id)
|
||||
return @weight.max
|
||||
end
|
||||
|
||||
def to_hash
|
||||
hash = {}
|
||||
instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
|
||||
|
||||
Reference in New Issue
Block a user