Change validation for experiment workimg

This commit is contained in:
Jure Grabnar 2016-08-10 08:58:29 +02:00
parent 9865ad80f9
commit 15d66c7884

View file

@ -14,7 +14,8 @@ class Experiment < ActiveRecord::Base
has_many :report_elements, inverse_of: :experiment, dependent: :destroy
has_attached_file :workflowimg
validates_attachment_content_type :workflowimg, content_type: /\Aimage\/.*\Z/
validates_attachment :workflowimg,
content_type: { content_type: ["image/png"] }
validates :name,
presence: true,