I am using the old auto_complete plugin in conjunction with the acts as taggable on gem in an attempt to basically replicate the tagging behavior of Stack Overflow itself! I am
I know this is old, but to recreate this behavior I used rails3-jquery-autocomplete with acts-as-taggable-on. They work very nicely and easily together.
// Model
class Foo < ActiveRecord::Base
acts_as_taggable_on :tags
end
// Controller
class FoosController < ApplicationController
autocomplete :tag, :name, :class_name => 'ActsAsTaggableOn::Tag'
...
end
// Routes
resources :foos do
collection do
get :autocomplete_tag_name
end
end
//View
<% form_for :foo do |form| %>
<%= form.label :tag_list, "Tags" %>
<%= form.autocomplete_field :tag_list, autocomplete_tag_name_foos_path, :"data-delimiter" => ', ' %>
<% end %>
Hope that helps someone.