Sha256: d206a279da67d90415be261bda2c2b6d715b2fe4cc3d11305db2a43ab62a0dcc
Contents?: true
Size: 580 Bytes
Versions: 55
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
55 entries across 55 versions & 1 rubygems