如何使用simple_form使用country_select gem列出所有国家/地区

And*_*hyn 4 ruby ruby-on-rails simple-form

我已添加gem 'country-select'到我的gemfile中,我需要在select中列出所有国家/地区.我尝试<%= f.input :country, as: :select %>但是国家没有出现.文档中没有相关信息.请帮我解决这个问题.

Sac*_*ngh 8

试试这个

<%= f.input :country, as: :country %>
Run Code Online (Sandbox Code Playgroud)