lib/sportdb/models/game.rb in sportdb-1.8.0 vs lib/sportdb/models/game.rb in sportdb-1.8.1

- old
+ new

@@ -1,6 +1,6 @@ -module SportDb::Models +module SportDb::Model class Game < ActiveRecord::Base belongs_to :team1, :class_name => 'Team', :foreign_key => 'team1_id' @@ -84,60 +84,26 @@ end ### getter/setters for deprecated attribs (score3,4,5,6) n national - def score3 - score1et - end + def score3() score1et end + def score4() score2et end + def score1ot() score1et end + def score2ot() score2et end + def score5() score1p end + def score6() score2p end - def score4 - score2et - end - - def score1ot - score1et - end + def score3=(value) self.score1et = value end + def score4=(value) self.score2et = value end + def score1ot=(value) self.score1et = value end + def score2ot=(value) self.score2et = value end + def score5=(value) self.score1p = value end + def score6=(value) self.score2p = value end - def score2ot - score2et - end - def score5 - score1p - end - def score6 - score2p - end - - def score3=(value) - self.score1et = value - end - - def score4=(value) - self.score2et = value - end - - def score1ot=(value) - self.score1et = value - end - - def score2ot=(value) - self.score2et = value - end - - def score5=(value) - self.score1p = value - end - - def score6=(value) - self.score2p = value - end - - - def self.create_knockouts_from_ary!( games, round ) Game.create_from_ary!( games, round, true ) end def self.create_from_ary!( games, round, knockout=false ) @@ -389,6 +355,6 @@ end end # class Game -end # module SportDb::Models +end # module SportDb::Model