From e0feee503865ac797a2d5bf95f7c655c0289a329 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 28 Apr 2014 09:51:39 -0400 Subject: Tournament: set status=0 by default --- app/models/tournament.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/tournament.rb b/app/models/tournament.rb index a569213..46a2ba7 100644 --- a/app/models/tournament.rb +++ b/app/models/tournament.rb @@ -8,6 +8,8 @@ class Tournament < ActiveRecord::Base alias_attribute :stages, :tournament_stages + before_save { self.status ||= 0 } + # Settings ################################################################# def settings -- cgit v1.2.3