Skip to content

Instantly share code, notes, and snippets.

@xorrbit
Created May 1, 2013 18:04
Show Gist options
  • Save xorrbit/5497013 to your computer and use it in GitHub Desktop.
Save xorrbit/5497013 to your computer and use it in GitHub Desktop.
Creating a world zone in spree
first create a new Zone called World and add any country to it
then fire up your ruby console and do:
Spree::Country.find_each { |country| Spree::ZoneMember.create! zone_id: Spree::Zone.where(:name => "World").first.id, zoneable_id: country.id, zoneable_type: "Spree::Country" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment