Remove Paperclip cruft

This commit is contained in:
Christoph Haas 2020-08-17 01:49:35 +02:00
parent eb8f27d9e6
commit 2f6be566ef

View file

@ -9,6 +9,12 @@ class Screenshot < ApplicationRecord
# Validate using 'active_storage_validations' gem
validates :image, attached: true, content_type: { in: 'image/png', message: 'is not a valid PNG image file' }
# Before migration from Paperclip to ActiveStorage:
#has_attached_file :image,
# styles: { :large => '800x600>', :thumb => '160x120>' },
# default_url: '/images/dummy/no-screenshots-available.svg',
# path: ':rails_root/public/screenshots/:id_partition/:style.png',
# url: '/screenshots/:id_partition/:style.png'
#validates_attachment_content_type :image, :content_type => 'image/png'
#validates_with AttachmentSizeValidator, :attributes => :image, :less_than => 5.megabytes
# validate :validate_image_is_unique