Remove Paperclip cruft
This commit is contained in:
parent
eb8f27d9e6
commit
2f6be566ef
1 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,12 @@ class Screenshot < ApplicationRecord
|
||||||
# Validate using 'active_storage_validations' gem
|
# Validate using 'active_storage_validations' gem
|
||||||
validates :image, attached: true, content_type: { in: 'image/png', message: 'is not a valid PNG image file' }
|
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_attachment_content_type :image, :content_type => 'image/png'
|
||||||
#validates_with AttachmentSizeValidator, :attributes => :image, :less_than => 5.megabytes
|
#validates_with AttachmentSizeValidator, :attributes => :image, :less_than => 5.megabytes
|
||||||
# validate :validate_image_is_unique
|
# validate :validate_image_is_unique
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue