Commit 42de1f79 authored by marcheing's avatar marcheing Committed by Diego de Araújo Martinez Camarinha

Add content verification for attached videos

Signed-off-by: Diego de Araújo Martinez Camarinha's avatarDiego Araújo <diegoamc@protonmail.ch>
parent dcd6f910
class Content < ApplicationRecord
has_attached_file :video
validates_attachment :video, presence: true,
content_type: /\Avideo\/.*\Z/
validates_attachment :video, presence: true
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment