adding a class to a text_field_tag
You declared it wrong. Here is the one will work. <%= text_field_tag :login_aei, “”, class: ‘form-control’ %> I gave the value of the input field as empty string, but you can give any value what meets your business needs.