-
Notifications
You must be signed in to change notification settings - Fork 13
fox-eye/Rails-Seed-All-Countries-and-All-States
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
To get a new seeds.rb file, just run parse_countries.php. This will build a seeds file to populate countries and states tables with all countries in the world along with all of their admin 1 regions. These regions correspond to what would be a state within the US. The generated file should be in utf8. The database model is pretty straightforward: countries: id name iso #An ISO abbreviation for the country states: id name country_id #the parent country's id, references an entry in countries. iso #An ISO abbreviation for the region. A special thanks to geonames.org for making all of this information available. You can find updated copies of the data files at: http://download.geonames.org/export/dump/
About
A script to generate a seed file from a database of all countries and all of their states or regions for use inside a Rails application.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published