baa*_*h05 2 country ruby-on-rails formtastic
我正在使用 formattastic,并且我有一个野外国家/地区。当我尝试显示屏幕时,我收到此错误。
要使用 :country 输入,请安装 Country_select 插件,如下所示:https: //github.com/jamesds/country-select
现在。我不想使用任何插件..它是自由文本,我想保持这种状态。
有人知道如何取消这个要求吗?应该很容易……但如果我能看到如何做,我会很烦恼。
= semantic_form_for @store, {:html => { :class => "form-horizontal" }} do |f|
= f.input :default_country
Run Code Online (Sandbox Code Playgroud)
添加 , :as => :string
到导致错误的行的末尾
= semantic_form_for @store, {:html => { :class => "form-horizontal" }} do |f|
= f.input :default_country, :as => :string
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
910 次 |
最近记录: |