【发布时间】:2015-10-12 15:25:08
【问题描述】:
我目前正在使用 country_select gem for ruby on rails: https://github.com/stefanpenner/country_select
以下代码打印所有国家/地区的列表:
<%= f.country_select :CountryTo, html_options = {:class => "form-control"} %>
我想在选择下拉列表中添加一个自定义选项字段,其值为“Anywhere”。 有谁知道我怎么能做到这一点?我对 Ruby on rails 很陌生,所以如果有一个超级简单的修复方法,我深表歉意,谢谢。
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4 drop-down-menu