Closed erbunao closed 4 years ago
With version 0.1.0 (released yesterday), you can now add missing states by editing db/states-lookup.yml
.
In the following example all cities with no corresponding state will be assigned to a new state named "Missing State":
SG:
"": "Missing State"
You can also rename or add missing cities by editing db/cities-lookup.yml
.
I am not sure this would fix the issue you are experiencing though, because it is a flaw on MaxMind database, but I am working on a new version of this gem that uses alternative sources. I am thinking to use OpenStreetMaps database but there are some technical difficulties in doing so - the OSM database size is about 40GB, so I am thinking to use GitHub Actions to process this database from time to time. Anyway, improvements are coming :)
PS: Sorry for the delayed reply.
That's no problem @loureirorg! Thanks for the update, I think this solves the problem at least for missing states.
The CSV pulled from MaxMind shows that several cities are available from Singapore. However those cities do not have a corresponding state which ended up excluded from the search list.
I was wondering if there are existing workarounds with this scenario. Is there a more future-proof way of dealing with a city without a state?