如何添加新国家?

How to add new country?

我正在使用 countries and country_select 个宝石。 gems 中缺少一些国家或国家的州,我们是否可以添加新的国家或州并使用自定义数据并在我们的 rails 项目中使用。?我需要做什么?

克隆 gem 存储库,进行更改,然后在您的项目中 Gemfile 为那些 gem 引用您自己的存储库。如果您认为您的更改对社区有用:为原始项目提出拉取请求。

修改yaml文件:https://github.com/hexorx/countries/blob/master/lib/cache/translations.yaml

If you have made changes to YAML run rake clean_yaml prior to committing to ensure your YAML is formatted properly.