Reputation: 1089
I have auto-generated text_field_tag inputs, and I don't want id
attributes there.
How to do this correctly?
Upvotes: 5
Views: 858
Reputation: 1711
You can specify the id
of the generated text field or any other HTML attribute in the options attribute of text_field_tag
. Setting it to nil
should remove it completely:
text_field_tag('name', nil, id: nil)
Upvotes: 5