Sha256: f3b2f1145a80319e250f7143e35556d0cc43ff09fff238c8b4de8972b90f8845
Contents?: true
Size: 438 Bytes
Versions: 11
Compression:
Stored size: 438 Bytes
Contents
# -*- encoding : utf-8 -*- # delete brackets from card content class OutWithTheBrackets < Cardio::Migration 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
11 entries across 11 versions & 1 rubygems