|
|
|
@ -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
|
|
|
|
|