You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
599 B
19 lines
599 B
class ModifyKeContentsForMarkdown < ActiveRecord::Migration[5.2]
|
|
# include ActionView::Helpers::SanitizeHelper
|
|
def change
|
|
# def ke_transform_to_md content
|
|
# sanitize(content, tags: %w(img a span), attributes: %w(src href target style))
|
|
# .gsub(/^(\n)/, "").gsub(/(\n)+/, "<br />").gsub(/$(\n)/, "")
|
|
# .gsub(/(\n)+/, "<br />").gsub("\t", " ")
|
|
# end
|
|
#
|
|
# MessageDetail.find_each do |m|
|
|
# content = ke_transform_to_md m.content
|
|
# puts("content:#{content}")
|
|
# m.update_column(:content, content)
|
|
# end
|
|
|
|
|
|
end
|
|
end
|