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