From d9893fbdb279b1ac2a030ccd794a134227b8d227 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 16 Jul 2019 13:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190713022300_modify_md_attachment_url_for_md_cotents.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20190713022300_modify_md_attachment_url_for_md_cotents.rb b/db/migrate/20190713022300_modify_md_attachment_url_for_md_cotents.rb index 3bc2d167c..99ea12309 100644 --- a/db/migrate/20190713022300_modify_md_attachment_url_for_md_cotents.rb +++ b/db/migrate/20190713022300_modify_md_attachment_url_for_md_cotents.rb @@ -29,7 +29,7 @@ class ModifyMdAttachmentUrlForMdCotents < ActiveRecord::Migration[5.2] 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? + p.update_column(:contents, p.contents.gsub("![](/attachments/download", "![](/api/attachments")) if p.introduction.present? end end end