Search code examples
ruby-on-railsformtasticcountry

Rails formtastic is asking for a country plug-in.. I don't want it. Anyone know how to tell it I don't want it?


I'm using formtastic and I've got a field country.. I'm getting this error when I attempt to display the screen.

To use the :country input, please install a country_select plugin, like this one: https://github.com/jamesds/country-select

Now. I don't want to use any plugin.. It's free text, and I want to keep it that way.

Anyone know how to remove this requirement? Should be easy as... but I'm buggered if I can see how.

= semantic_form_for @store, {:html => { :class => "form-horizontal" }} do |f|
  = f.input :default_country

Solution

  • Add , :as => :string

    to the end of the line that's causing the error

    = semantic_form_for @store, {:html => { :class => "form-horizontal" }} do |f|
      = f.input :default_country, :as => :string