Sha256: abe270e483fc31077e43359466a88f37075ab15de3c8b2006ffeb8ff34da7080
Contents?: true
Size: 449 Bytes
Versions: 4
Compression:
Stored size: 449 Bytes
Contents
# -*- encoding : utf-8 -*- # delete brackets from card content class OutWithTheBrackets < Cardio::Migration::Transform def up Card["*getting started links"]&.update_column :type_id, :link_list.card_id list_type_ids = %i[pointer list].map(&:card_id) ["[[", "]]"].each do |brackets| Card.where(type_id: list_type_ids).in_batches.update_all( "db_content = REPLACE(db_content, '#{brackets}', '')" ) end end end
Version data entries
4 entries across 4 versions & 1 rubygems