aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/resource_type.rb
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-14 17:16:43 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-14 17:16:43 +0000
commit2022831d4960054aef904e27fd2934beb4e3c65e (patch)
tree77f11b9c629d66b9782d7dc6c77105bb178116d8 /app/models/resource_type.rb
parent9292aae8fe1876fe98c90ae0216fb4ea8917b38a (diff)
Adds category model but not wired up to resource yet
Diffstat (limited to 'app/models/resource_type.rb')
-rw-r--r--app/models/resource_type.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/resource_type.rb b/app/models/resource_type.rb
index 066a734..414e71e 100644
--- a/app/models/resource_type.rb
+++ b/app/models/resource_type.rb
@@ -1,3 +1,4 @@
class ResourceType < ApplicationRecord
has_many :pdfresources
+ validates :name, presence: true, uniqueness: true
end