[英]How to list all countries in select using country_select gem with simple_form
I have added gem 'country-select'
to my gemfile, and I need to list all countries in a select. 我已经将gem 'country-select'
到我的gemfile中,我需要在select中列出所有国家/地区。 I try <%= f.input :country, as: :select %>
but countries don't appear. 我尝试<%= f.input :country, as: :select %>
但不显示国家/地区。 There are no info about that in documentation. 文档中没有相关信息。 Please help me with this issue. 请帮我解决这个问题。
试试这个
<%= f.input :country, as: :country %>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.