Sha256: a5e4a3190a9300dbc7f36cd10fb2fefe7ebf06e214543abfa91a82cb51e4f599
Contents?: true
Size: 361 Bytes
Versions: 43
Compression:
Stored size: 361 Bytes
Contents
ActiveRecord::Base.transaction do Spree::Country.all.each do |country| carmen_country = Carmen::Country.coded(country.iso) next unless carmen_country.subregions? carmen_country.subregions.each do |subregion| Spree::State.where(abbr: subregion.code, country: country).first_or_create!( name: subregion.name ) end end end
Version data entries
43 entries across 43 versions & 1 rubygems