thecodecrate / city-state

Simple ruby gem to create form lists with cities and states
MIT License
306 stars 135 forks source link

Missing cities #11

Open ESouza opened 8 years ago

ESouza commented 8 years ago

Hello guys, I see that we are missing few cities from the database. For example:

Florida missing : coconut creek, coral springs, margate, just to list a few.

What is the best way to add them?

thanks

fsobarzo commented 8 years ago

Me too see missing cities in Metropolitan Santiago (Chile). Can we only update csv then do a pull request?.

Thanks

basicBrogrammer commented 8 years ago

I am having intermittent missing cities.

SagareGanesh commented 8 years ago

@ESouza There are two ways to add cities in the Database.

  1. Update csv file i.e GeoLite2-City-Locations-en.csv which is in lib/db folder.
  2. When you call CS.cities(state_code, country_code) first time, It creates file in lib/db named cities.(country_code) After that, for all calls for same country, it refers this file for data.

    Example: if you call CS.cities(:MH, :IN) It creates file named "cities.in", which contains state wise all cities in India.

    If you update this file, you will get expected result

    Hope this will help you, Thanks

bj-narola commented 5 years ago

The command is not creating any file under lib folder. There must be some other way to add the missing cities.