Screenshot validator uses string instead of regex

This commit is contained in:
Christoph Haas 2015-04-27 00:19:47 +02:00
parent 4c6beadd8e
commit 7e1bf0d152

View file

@ -10,7 +10,7 @@ class Screenshot < ActiveRecord::Base
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 => /\Aimage\/png\Z/
validates_attachment_content_type :image, :content_type => 'image/png'
# Return caption for full-screen screenshots.
# Takes the description of a screenshot if available.