Skip to content

Instantly share code, notes, and snippets.

@oliverbarnes
Created September 30, 2010 17:03
Show Gist options
  • Save oliverbarnes/604924 to your computer and use it in GitHub Desktop.
Save oliverbarnes/604924 to your computer and use it in GitHub Desktop.
## Continents and Countries
Continent.create!({:name => 'North America' }) do |continent|
continent.countries << Country.create!({:name => 'Canada'})
continent.countries << Country.create!({:name => 'USA'})
end
Continent.create!({:name => 'South America' }) do |continent|
continent.countries << Country.create!({:name => 'Argentina'})
continent.countries << Country.create!({:name => 'Bolivia'})
continent.countries << Country.create!({:name => 'Chile'})
end
Continent.create!({:name => 'Europe' }) do |continent|
continent.countries << Country.create!({:name => 'France'})
continent.countries << Country.create!({:name => 'Netherlands'})
continent.countries << Country.create!({:name => 'Norway'})
continent.countries << Country.create!({:name => 'Scotland'})
continent.countries << Country.create!({:name => 'Spain'})
continent.countries << Country.create!({:name => 'Sweden'})
end
Continent.create!({:name => 'United Kingdom' }) do |continent|
continent.countries << Country.create!({:name => 'England'})
continent.countries << Country.create!({:name => 'Ireland'})
end
Continent.create!({:name => 'Africa' }) do |continent|
continent.countries << Country.create!({:name => 'South Africa'})
end
Continent.create!({:name => 'Asia' }) do |continent|
continent.countries << Country.create!({:name => 'China'})
continent.countries << Country.create!({:name => 'India'})
continent.countries << Country.create!({:name => 'Japan'})
continent.countries << Country.create!({:name => 'Malaysia'})
continent.countries << Country.create!({:name => 'Singapore'})
continent.countries << Country.create!({:name => 'South Korea'})
continent.countries << Country.create!({:name => 'Taiwan'})
continent.countries << Country.create!({:name => 'United Arab Emirates'})
end
Continent.create!({:name => 'Australasia' }) do |continent|
continent.countries << Country.create!({:name => 'Australia'})
continent.countries << Country.create!({:name => 'Indonesia'})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment