Rodrigo Zurek
Rodrigo Zurek

Reputation: 4575

rails encapsulate tags in textfield

I would like to know how to implement a textfield for TAGS in ROR?

like the ones used in stack overflow, or at emails where you type a text and after you hit space it capsules it.

I would appreciate any gem or any info about the matter.

example1:

example

example2:

example

Thanks

Upvotes: 0

Views: 47

Answers (1)

sohaibbbhatti
sohaibbbhatti

Reputation: 2682

Please have a look at chosen. I.e. give the multi-select example a try.

Add the "chzn-select" class to the multi-select requiring the tagging behavior.

And in your javascript, invoke the chosen initialization method, $(".chzn-select").chosen();

Upvotes: 1

Related Questions