Rails 4 tagging in place editing

146 views Asked by At

I'm looking for way to implement a tagging system similar to the one in stackoverflow i.e. type a word into a text field hit enter and the tag is saved and do this multiple times. Currently I'm using the best_in_place gem and I have a working version where I can edit a single tag.

Is there way to use best_in_place to do this or is there a better way, for example using act_as_taggable and some jquery?

Thanks

1

There are 1 answers

0
MatayoshiMariano On

I have done what you say but using select2, it has support for multipple tags, you can set a delimiter character like a , and every time you hit enter the tag is added.

You can add the js and css files to the rails project or simple add the select2 gem to your Gemfile.