How to list all countries in select using country_select gem with simple_form

烂漫一生 提交于 2019-12-07 07:57:14

问题


I have added gem 'country-select' to my gemfile, and I need to list all countries in a select. I try <%= f.input :country, as: :select %> but countries don't appear. There are no info about that in documentation. Please help me with this issue.


回答1:


try this out

<%= f.input :country, as: :country %>


来源:https://stackoverflow.com/questions/18302078/how-to-list-all-countries-in-select-using-country-select-gem-with-simple-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!