Skip to content

Commit

Permalink
Merge pull request #3033 from jontarg/patch-1
Browse files Browse the repository at this point in the history
Make seed file fully idempotent
  • Loading branch information
jacobherrington authored Jan 11, 2019
2 parents aabb096 + 22c11d9 commit e2ac66b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/db/default/spree/zones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

%w(PL FI PT RO DE FR SK HU SI IE AT ES IT BE SE LV BG GB LT CY LU MT DK NL EE HR CZ GR).
each do |symbol|
eu_vat.zone_members.create!(zoneable: Spree::Country.find_by!(iso: symbol))
eu_vat.zone_members.find_or_create_by!(zoneable: Spree::Country.find_by!(iso: symbol))
end

%w(US CA).each do |symbol|
north_america.zone_members.create!(zoneable: Spree::Country.find_by!(iso: symbol))
north_america.zone_members.find_or_create_by!(zoneable: Spree::Country.find_by!(iso: symbol))
end

0 comments on commit e2ac66b

Please sign in to comment.