lib/sportdb/models/game.rb in sportdb-1.9.1 vs lib/sportdb/models/game.rb in sportdb-1.9.2
- old
+ new
@@ -12,10 +12,10 @@
belongs_to :group # group is optional
belongs_to :ground # ground is optional
belongs_to :city, class_name: 'WorldDb::Model::City', foreign_key: 'city_id' # city is optioanl (remove?? redundant?? use ground ??)
- has_many :goals
+ has_many :goals, :dependent => :delete_all
before_save :calc_winner