From 44b06e4b4c0cd2a8935ea6efbd14d1675b031fcb Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 21 Jan 2025 10:38:14 -0500 Subject: Add support for gifs --- app/models/blog.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/blog.rb') 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 validates :body, presence: true, if: :published validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published validates :user, presence: true - validates :images, content_type: ['image/png', 'image/jpeg', 'video/mp4'] + validates :images, content_type: ['image/png', 'image/jpeg', 'video/mp4', 'image/gif'] before_validation :set_draft_title before_save :set_published_at -- cgit 1.4.1