From c6bb414b57a2ae8c6927826b143027f5c43dada9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 10 Jan 2025 18:22:23 -0500 Subject: Made uploading videos work --- 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 db05432..37b60dd 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'] + validates :images, content_type: ['image/png', 'image/jpeg', 'video/mp4'] before_validation :set_draft_title before_save :set_published_at -- cgit 1.4.1