From 2022831d4960054aef904e27fd2934beb4e3c65e Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 14 Nov 2024 17:16:43 +0000 Subject: Adds category model but not wired up to resource yet --- app/models/resource_type.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/resource_type.rb') 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 -- cgit v1.2.3