about summary refs log tree commit diff stats
path: root/app/models/game.rb
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-03-12 21:50:00 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-03-12 21:50:00 -0400
commit7789e2138fc0479846c20bc68d68973636a4a760 (patch)
treeef14af7a0a6e0de8f086a2b2db877840eb48904c /app/models/game.rb
parent7a2d945f581c8ce9e322883ec597366143fe10cb (diff)
downloadthoughts-7789e2138fc0479846c20bc68d68973636a4a760.tar.gz
thoughts-7789e2138fc0479846c20bc68d68973636a4a760.tar.bz2
thoughts-7789e2138fc0479846c20bc68d68973636a4a760.zip
Started game tracker
Diffstat (limited to 'app/models/game.rb')
-rw-r--r--app/models/game.rb13
1 files changed, 13 insertions, 0 deletions
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 @@
1class Game < ApplicationRecord
2 extend Enumerize
3
4 audited only: [:status, :progress]
5
6 validates :title, presence: true
7 validates :status, presence: true
8
9 enumerize :status,
10 in: [:playing, :upcoming, :held, :dropped, :finished],
11 default: :upcoming
12
13end