about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-01-21 10:38:14 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2025-01-21 10:38:14 -0500
commit44b06e4b4c0cd2a8935ea6efbd14d1675b031fcb (patch)
tree82f5283e60b453abaf9d10afcfb8e6408410cd56
parent877e02087739e446cb000b619ac0a12d171d04ab (diff)
downloadthoughts-master.tar.gz
thoughts-master.tar.bz2
thoughts-master.zip
Add support for gifs HEAD master
-rw-r--r--app/models/blog.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/blog.rb b/app/models/blog.rb index 37b60dd..03c0619 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', 'video/mp4'] 18 validates :images, content_type: ['image/png', 'image/jpeg', 'video/mp4', 'image/gif']
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