risuiowa / rails-jquery-autocomplete

An easy and unobtrusive way to use jQuery's autocomplete with Rails 3 and later.
MIT License
212 stars 80 forks source link

Separator gets lost in forms #69

Open nurbs999 opened 8 years ago

nurbs999 commented 8 years ago

This seems to be related to https://github.com/mbleigh/acts-as-taggable-on/issues/620

The helper

<%= f.autocomplete_field :tag_list, autocomplete_tag_name_projects_path, 'data-delimiter' => ',' %>

is missing the separator in the value. A quick fix is to add the value manually

<%= f.autocomplete_field :tag_list, autocomplete_tag_name_projects_path, value: @project.tag_list.to_s, 'data-delimiter' => ',' %>