Sha256: cd4c75f68bb1c9806c2df220416b2b161cdf84795666176d0c5f808a5143772e
Contents?: true
Size: 580 Bytes
Versions: 19
Compression:
Stored size: 580 Bytes
Contents
require 'carmen' Carmen::Country.all.each do |country| Spree::Country.where( 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? ).first_or_create end Spree::Config[:default_country_id] = Spree::Country.find_by(iso: "US").id # find countries that do not use postal codes (by iso) and set 'zipcode_required' to false for them. Spree::Country.where(iso: Spree::Address::NO_ZIPCODE_ISO_CODES).update_all(zipcode_required: false)
Version data entries
19 entries across 19 versions & 1 rubygems