Open gdgp opened 7 years ago
isn't a text_field a type of input field?
This is what finally worked for me (with select2-rails
and SimpleForm):
= f.input :tag_list, collection: @tags, label: "Tags", value_method: :name, label_method: :name, input_html: { multiple: true, class: "js-tags-input tags-input" }
$(function() {
$('.js-tags-input').select2({
theme: 'bootstrap',
tags: true,
width: '100%'
});
});
.tags-input {
display: none;
}
In the wiki page Add a tag field to forms in Rails 4.2 and above
It is mentioned that:
However, as mentioned in the link provided in that very same page I think it should be
f.input
and notf.text_field