diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-01-10 18:22:23 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-01-10 18:22:23 -0500 |
commit | c6bb414b57a2ae8c6927826b143027f5c43dada9 (patch) | |
tree | 0cb3bb467812cd3388c42e6c8235fd51821438b9 /app/models | |
parent | 60a15bbe721f23ec05093107da6cb3056d158c90 (diff) | |
download | thoughts-c6bb414b57a2ae8c6927826b143027f5c43dada9.tar.gz thoughts-c6bb414b57a2ae8c6927826b143027f5c43dada9.tar.bz2 thoughts-c6bb414b57a2ae8c6927826b143027f5c43dada9.zip |
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blog.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/blog.rb b/app/models/blog.rb index db05432..37b60dd 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb | |||
@@ -15,7 +15,7 @@ class Blog < ApplicationRecord | |||
15 | validates :body, presence: true, if: :published | 15 | validates :body, presence: true, if: :published |
16 | validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published | 16 | validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published |
17 | validates :user, presence: true | 17 | validates :user, presence: true |
18 | validates :images, content_type: ['image/png', 'image/jpeg'] | 18 | validates :images, content_type: ['image/png', 'image/jpeg', 'video/mp4'] |
19 | 19 | ||
20 | before_validation :set_draft_title | 20 | before_validation :set_draft_title |
21 | before_save :set_published_at | 21 | before_save :set_published_at |