From 2b90e22a23ac093b9f268a8709867c565604eb52 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 14 Nov 2024 09:50:41 +0000 Subject: Refactored validation lines in model --- app/models/pdfresource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/pdfresource.rb b/app/models/pdfresource.rb index 110a3c7..a5ef56d 100644 --- a/app/models/pdfresource.rb +++ b/app/models/pdfresource.rb @@ -6,7 +6,7 @@ class Pdfresource < ApplicationRecord numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 3, allow_nil: true }, allow_nil: true validate :validate_pdf_count - validates :name, presence: true + validates :name, :thumbnails, presence: true def validate_pdf_count if pdfs.size > 10 -- cgit v1.2.3