Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6133655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:15:26+00:00 2026-05-23T17:15:26+00:00

I am using the old auto_complete plugin in conjunction with the acts as taggable

  • 0

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 more or less doing what is described in this rails cast. For single tags, this works great. However, I would really like to make it so that every time the user enters a space or a comma (much like on Stack Overflow), the autocomplete will start anew. I’d imagine there is some way to do this via regex, but I’m not sure how to go about applying this behavior to the text_field (I’d imagine using JavaScript to “restart” the autocomplete, but admittedly I am fairly weak when it comes to JavaScript. This is what my view looks like:

<%= text_field_with_auto_complete :business, :tags, {}, { :url => formatted_businesses_path(:js), :method => :get, :with => "'search=' + element.value" } %>

My controller is very straightforward, simply saving the tags for that particular business.

If someone could point me in the right direction (As I’m not sure how to go about doing this) I would greatly appreciate it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:15:26+00:00Added an answer on May 23, 2026 at 5:15 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I periodically get this problem where all of a sudden mako is using old
We're using an old application that stores dates in C / Unix format. C
In the old days using MFC I could turn a property sheet into a
At the team with which I work, we have an old codebase using PHP's
We have an old project written using Managed C++ syntax. I would like to
I'm using mod_rewrite to map my old directory structure to a new one. I
I had an old (but great) app using NHibernate 1.0.2. Worked like a charm.
We have some really old code that calls WebServices using behaviours (webservice.htc), and we
I have some old code written in C for 16-bit using Borland C++ that
Well I am using the following code to take any old image into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.