diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-14 09:50:41 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-14 09:50:41 +0000 |
commit | 2b90e22a23ac093b9f268a8709867c565604eb52 (patch) | |
tree | c9b0451f3e071e149d11c105ccf123bcd2d36093 | |
parent | ed4a5a07b70f1d3e23dd74bc217477694200e9cb (diff) |
Refactored validation lines in model
-rw-r--r-- | app/models/pdfresource.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |