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