Using the acts_as_taggable_on works great. But generates a comma separated list. I’m wondering the best way to add a wrapper element and class to each individually. I’ve been able to do it in jQuery, but I’d much rather do it in a rails helper.
ie.
item.tags = "big, bigger, biggest"
item.tag_list = ["big", "bigger", "biggest"]
to render as:
<span class="tag">big</span>
<span class="tag">bigger</span>
<span class="tag">biggest</span>
Here’s a helper that can generate a list of spans based on the tag_list sent in.
You would then call it with:
which will output