For me, this works:
Coffee script:
$( ".tags" ).select2 theme: "bootstrap", tags: true tokenSeparators: [',']
and in view:
= f.input :tag_list, input_html: { class: 'tags', multiple: "multiple" }, collection: @video.tag_list
The important part of multiple: "multiple"
And, of course, as Mitya said, do not forget to add {tag_list: []} to your strong controller parameters.
And as an example, if you want your tags to be offered in a drop-down list, you can do this:
= f.input :tag_list, input_html: { class: 'tags', multiple: "multiple" }, collection: ActsAsTaggableOn::Tag.most_used(30), value_method: :name
source share