I'm switching my application over to use simple_form
but I'm a little confused about how to display a text input. For instance when I do the following:
f.input :foobar # <textarea name = "model[foobar]"></textarea>
I get a textarea instead instead in input w/ a type of text. How can I force simple_form to output a text input?
it's happening because the field is a text
column in the database, rather than string
/varchar
/etc., you can override the default like so:
f.input :foobar, :as => :string
You can read about all the mappings in the simple_form readme under "Mappings/Inputs available".