新建实训默认描述图片无法显示

dev_forum
daiao 6 years ago
parent d82a12d84b
commit 1821708642

@ -26,5 +26,10 @@ class ModifyMdAttachmentUrlForMdCotents < ActiveRecord::Migration[5.2]
subjects.find_each do |s|
s.update_column(:description, s.description.gsub("![](/attachments/download", "![](/api/attachments")) if s.description.present?
end
plats = PlatformSample.where(samples_type: ['introduction', 'knowledge'])
plats.find_each do |p|
p.update_column(:contents, p.introduction.gsub("![](/attachments/download", "![](/api/attachments")) if p.introduction.present?
end
end
end

Loading…
Cancel
Save