2

I have a new application that contains a Modela called "Campaigns". Each campaign is able to have any number of tags associated with it.

What I am attempting to do is impliment a Stack Overflow-like behavior with these tags. Namely, that when you create a new campaign, it gives you a text-field that will auto-complete with tags that already exist, and start anew every time you put a space. Additionally, should the tag not exist, it should create a new tag.

This railscast is a step in the right direction, but it only allows for one "tag" at a time.

Can anyone point me in the right direction?

1 Answer 1

1

In the model layer I'd go for a plugin like: https://github.com/mbleigh/acts-as-taggable-on.

In the view you want an autocomplete plugin (personally I use this http://docs.jquery.com/Plugins/autocomplete). Then either generate a controller for the tags and fetch the autocomplete list remotely or just = them in the page.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.