title: rails-jquery-autocomplete and acts_as_taggable form routing
body: <p>Acts_as_taggable is working correctly. I did the following to add <a href="https://github.com/bigtunacan/rails-jquery-autocomplete" rel="nofollow noreferrer">rails-jquery-autocomplete</a> to my webapp. I am using Rails 4.2.2/Heroku in production.</p>
  
  <pre><code>add gem 'rails-jquery-autocomplete' to gem file
  bundle install
  heroku run bundle install
  
  updated my application.js file to 
  
  //= require jquery
  //= require jquery_ujs
  //= require jquery-ui/autocomplete
  //= require autocomplete-rails
  //= require bootstrap
  //= require turbolinks
  //= require_tree .
  
  and pushed to Heroku
  
  // Model
  class Photo &lt; ActiveRecord::Base
    acts_as_taggable_on :tags
  end
  
  // Controller
  class PhotosController &lt; ApplicationController
    autocomplete :tag, :name, :class_name =&gt; 'ActsAsTaggableOn::Tag'
    ...
  private
    def photo_params
      params.require(:photo).permit(:picture, :title, :tag_list)
    end
  end
  
  // Routes
  get 'tags/:tag', to: 'photos#index', as: :tag
  resources :photos do
      get :autocomplete_tag_name, :on =&gt; :collection
  end
  
  //View  
  
  &lt;% form_for :photo, url: photos_path, html: {multipart: true } do |form| %&gt;
    &lt;%= f.file_field :picture %&gt;
    &lt;%= f.text_field :title %&gt; 
    &lt;%= form.label :tag_list, "Tags" %&gt;
    &lt;%= form.autocomplete_field :tag_list, autocomplete_tag_name_photos_path, :"data-delimiter" =&gt; ', ' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The form saves and the tags and photo are added to the database but the auto-complete does not work at all. </p>
  
  <p>I have been through <a href="https://stackoverflow.com/questions/4486745/rails-autocomplete-tags-separated-by-commas-using-regex/6687895#6687895">these</a> <a href="https://stackoverflow.com/questions/4937185/how-to-add-tagging-with-autocomplete-to-an-existing-model-in-rails">topics</a> but they have not helped me find the answer. </p>