To use the :country input, please install a country_select plugin

前端 未结 6 1345
-上瘾入骨i
-上瘾入骨i 2021-01-18 03:19

I have a country attribute to my guidelines model. I don\'t want to use a plugin, I just want to have country as a string. Everything is working until I try to edit a guide

6条回答
  •  长发绾君心
    2021-01-18 04:10

    I'm not sure where you get this form code from but I had the same issue with Active Admin and resolved it by explicitly instructing the form to treat the field as a string:

    ActiveAdmin.register Guideline do
    
      form do |f|
        f.inputs 'Details' do
          f.input :country, :as => :string
        end
        f.actions
      end
    
    end
    

提交回复
热议问题