How to use the Countries gem

后端 未结 2 760
抹茶落季
抹茶落季 2021-02-10 00:00

I am trying to use the Countries Gem, but had some basic questions on how to incorporate this gem after I\'ve bundle-installed it.

  1. Do I need to create a new contro
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-10 00:22

    1) You don't need a new controller/model to access the countries

    2) There is an example app on the README page which shows you how to use forms and dropdowns.

    3) The countries are stores within the app. I believe country_select includes the ISO 3166 gem to get the list of countries. You can view the data in the countries.yaml file

    If want to know anything else, I recommend looking at the example app. It provides a good example of how to use the gem.

提交回复
热议问题