From c95a61fc056f6a2d7fdb82f9288948a890a3bac5 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 31 Jan 2022 14:00:13 -0500 Subject: switch to table, add total counts --- app/models/player.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/models') 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 -- cgit 1.4.1