From 7e1bf0d152ced3d0513db11dd9057044e0d27b16 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Mon, 27 Apr 2015 00:19:47 +0200 Subject: [PATCH] Screenshot validator uses string instead of regex --- app/models/screenshot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/screenshot.rb b/app/models/screenshot.rb index b11ee73..792a66b 100644 --- a/app/models/screenshot.rb +++ b/app/models/screenshot.rb @@ -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.