Sha256: 818ec5f8f77e9c81ee14a8c67e76c279f13f5f403922aa4d36a22428b07224c6

Contents?: true

Size: 357 Bytes

Versions: 10

Compression:

Stored size: 357 Bytes

Contents

require 'carmen'

Carmen::Country.all.each do |country|
  unless Gaku::Country.exists?(iso: country.alpha_2_code)

    Gaku::Country.create!(name: country.name,
      iso3: country.alpha_3_code,
      iso: country.alpha_2_code,
      iso_name: country.name.upcase,
      numcode: country.numeric_code,
      states_required: country.subregions?)

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku_core-0.3.0 db/default/gaku/countries.rb
gaku_core-0.3.0.pre.4 db/default/gaku/countries.rb
gaku_core-0.3.0.pre.3 db/default/gaku/countries.rb
gaku_core-0.3.0.pre.2 db/default/gaku/countries.rb
gaku_core-0.3.0.pre.1 db/default/gaku/countries.rb
gaku_core-0.3.0.pre.0 db/default/gaku/countries.rb
gaku-0.2.4 core/db/default/gaku/countries.rb
gaku_core-0.2.4 db/default/gaku/countries.rb
gaku-0.2.3 core/db/default/gaku/countries.rb
gaku_core-0.2.3 db/default/gaku/countries.rb