summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-28 09:51:39 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-28 09:51:39 -0400
commite0feee503865ac797a2d5bf95f7c655c0289a329 (patch)
tree1da40eec6a639d1b248833772301cb621b2cb7c1
parentf8e9b0349b82278c8fb015037e901dd5a77e30e7 (diff)
Tournament: set status=0 by default
-rw-r--r--app/models/tournament.rb2
1 files changed, 2 insertions, 0 deletions
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