diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-14 11:12:36 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-14 11:12:36 +0000 |
commit | 1062c6328f60bf9cacba20c07f5cd33e55c153ee (patch) | |
tree | b780312b4fd1427707cbaecdc45711ea827b9fb8 /app/models | |
parent | e636e93c866b000ae4674605ea0543930c7e2e99 (diff) |
Adds credits to resource and required asterisks on form
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/pdfresource.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/pdfresource.rb b/app/models/pdfresource.rb index a5ef56d..86e600c 100644 --- a/app/models/pdfresource.rb +++ b/app/models/pdfresource.rb @@ -6,7 +6,8 @@ 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, :thumbnails, presence: true + validates :name, :thumbnails, :description, :card_description, :pdfs, :credits, presence: true + def validate_pdf_count if pdfs.size > 10 |