From 7789e2138fc0479846c20bc68d68973636a4a760 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 12 Mar 2019 21:50:00 -0400 Subject: Started game tracker --- app/models/game.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/models/game.rb (limited to 'app/models') diff --git a/app/models/game.rb b/app/models/game.rb new file mode 100644 index 0000000..de33377 --- /dev/null +++ b/app/models/game.rb @@ -0,0 +1,13 @@ +class Game < ApplicationRecord + extend Enumerize + + audited only: [:status, :progress] + + validates :title, presence: true + validates :status, presence: true + + enumerize :status, + in: [:playing, :upcoming, :held, :dropped, :finished], + default: :upcoming + +end -- cgit 1.4.1