mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +08:00
Change validation for experiment workimg
This commit is contained in:
parent
9865ad80f9
commit
15d66c7884
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue