Permalink
Browse files

Fix #84 migration error populating countries and states

  • Loading branch information...
patricklewis committed Jan 19, 2016
1 parent ab94496 commit 68feebfefcd2733836f97c5d3662509bdcc22aeb
Showing with 5 additions and 5 deletions.
  1. +4 −4 db/migrate/20120104020930_populate_countries_and_states.rb
  2. +1 −1 piggybak.gemspec
@@ -10,15 +10,15 @@ def up
end
ISO3166::Country.all.each do |country_array|
name = country_array[0]
abbr = country_array[1]
name = country_array.name
abbr = country_array.alpha2
country = Piggybak::Country.create :name => name, :abbr => abbr
iso3166_country = ISO3166::Country.new(abbr)
iso3166_country.states.each do |key, value|
name = key
abbr = value["name"]
name = value['name']
abbr = key
Piggybak::State.create! :name => name, :abbr => abbr, :country => country
end
end
View
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
s.test_files = Dir["spec/*"]
s.add_dependency "countries"
s.add_dependency "countries", '~> 1.2.2'
s.add_dependency "activemerchant"
s.add_dependency "rack-ssl-enforcer"
end

0 comments on commit 68feebf

Please sign in to comment.