aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/thing.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/thing.rb b/app/models/thing.rb
index f3596f1..7ec6dc6 100644
--- a/app/models/thing.rb
+++ b/app/models/thing.rb
@@ -12,9 +12,10 @@ class Thing < ApplicationRecord
has_many :tag_references, as: :taggable, dependent: :destroy
has_many :tags, through: :tag_references
- enum :status, %i[read notread tobepublished], validate: true
- enum :kind, %i[other poetry theater essay shorts
- novel paper letters phd chronicle bio it], validate: true
+ enum :status, { read: 0, notread: 1, tobepublished: 2 }, validate: true
+ enum :kind, { other: 0, poetry: 1, theater: 2, essay: 3,
+ shorts: 4, novel: 5, paper: 6, letters: 7,
+ phd: 8, chronicle: 9, bio: 10, it: 11 }, validate: true
# Returns all things which match the given text for any of the string columns
# from the table.