My ERB file works fine if I use text_field
, but if I switch to text_field_tag
I receive this error:
undefined method `text_field_tag' for #<ActionView::Helpers::FormBuilder:0x00000001f6fd50>
Here is the code that works:
<%= f.text_field mystring %>
And the code that does not work:
<%= f.text_field_tag mystring %>
text_field_tag is documented. How to make it work? Do I need a require
or something?