diff options
author | David Gay <david@davidgay.org> | 2021-05-02 18:25:54 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-02 18:25:54 -0400 |
commit | d0106b850a6c26cfcf3ebfcc383a3190934949d4 (patch) | |
tree | c2b43ea6888620941f605cf412d340839e563765 /app/models | |
parent | d717f7db2279a35b1259030b9b31e966a341fe99 (diff) |
Fix boolean validation in Item model
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/item.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/item.rb b/app/models/item.rb index b570b4e..71482f5 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -1,5 +1,6 @@ class Item < ApplicationRecord enum equip_slot: [:mainhand, :offhand, :head, :neck, :back, :torso, :grip, :left_ring, :right_ring, :waist, :legs, :feet, :curio] - validates :gid, :name, :description, :usable, presence: true + validates :gid, :name, :description, presence: true + validates :usable, inclusion: { in: [true, false] } end |