Sha256: fc13d3062bd094447e3db8ec4b9c4983e34bfd363be975c84b5062024f1b9b0a

Contents?: true

Size: 310 Bytes

Versions: 5

Compression:

Stored size: 310 Bytes

Contents

# -*- encoding : utf-8 -*-

class CreateReferencesForSearchCards < Cardio::Migration::Core
  def up
    Card.where(
      type_id: Card::SearchTypeID
    ).find_each.with_index do |card, index|
      card.update_references_out
      puts "completed #{index} search cards" if index % 100 == 0
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
card-1.101.4 db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb
card-1.101.3 db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb
card-1.101.2 db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb
card-1.101.1 db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb
card-1.101.0 db/migrate_core_cards/20150807205221_create_references_for_search_cards.rb