about summary refs log tree commit diff
path: root/app/models/player.rb
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2022-01-31 14:00:13 -0500
committerBen Harris <ben@tilde.team>2022-01-31 14:00:13 -0500
commitc95a61fc056f6a2d7fdb82f9288948a890a3bac5 (patch)
treeac830576036bdc54d742668345680e452af69b99 /app/models/player.rb
parentc5b9fe77a8a0e1c2e6a051b700c5a5d4b98ff6fb (diff)
switch to table, add total counts
Diffstat (limited to 'app/models/player.rb')
-rw-r--r--app/models/player.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/player.rb b/app/models/player.rb
index f8ebc6d..7032197 100644
--- a/app/models/player.rb
+++ b/app/models/player.rb
@@ -1,4 +1,11 @@
 # frozen_string_literal: true
 
 class Player < ApplicationRecord
+  after_initialize :default_values
+
+  private
+  def default_values
+    self.strikes ||= 0
+    self.paid ||= true
+  end
 end