From 5e13fb19c7fa08bf5cd049514d59c0d39ff453fd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 16 Jul 2019 14:01:01 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?= 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 99ea12309..10b821fc5 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.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