Sha256: 2aafded142621b852dda5bbc464fadac5c288a4f6ed6cba539d8162e58ea463c

Contents?: true

Size: 644 Bytes

Versions: 9

Compression:

Stored size: 644 Bytes

Contents

BREED_BY_LICENSE_NUMBER = File.expand_path('../breed_by_license_number.csv', __FILE__)

class Pet2 < ActiveRecord::Base
  self.primary_key = "name"
  col :name
  col :breed_id
  col :license_number, :type => :integer

  data_miner do
    process :auto_upgrade!
    process :run_data_miner_on_parent_associations!
    import("A list of pets", :url => "file://#{PETS}") do
      key :name
      store :license_number
    end
    import("Breed numbers based on license number", :url => "file://#{BREED_BY_LICENSE_NUMBER}") do
      key :license_number
      store :breed_id, :field_name => :breed, :nullify_blank_strings => true
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
data_miner-2.5.2 test/support/pet2.rb
data_miner-2.5.1 test/support/pet2.rb
data_miner-2.5.0 test/support/pet2.rb
data_miner-2.4.1 test/support/pet2.rb
data_miner-2.4.0 test/support/pet2.rb
data_miner-2.3.4 test/support/pet2.rb
data_miner-2.3.2 test/support/pet2.rb
data_miner-2.3.1 test/support/pet2.rb
data_miner-2.3.0 test/support/pet2.rb