New upload review process partly finished

This commit is contained in:
Christoph Haas 2017-01-18 21:30:14 +01:00
parent 821364483e
commit 34d7eb649c
5 changed files with 70 additions and 24 deletions

View file

@ -8,7 +8,7 @@ class Screenshot < ApplicationRecord
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
# validate :validate_image_is_unique
validates :delete_reason, length: { in: 5..100 }, allow_nil: true
# Validator that checks if the image has already been uploaded.