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