Ask A Question

Notifications

You’re not receiving notifications from this thread.

Bootstrap class on individual tags in tag list

Gerard Donnelly asked in General

Hi Guys,
I am using the "acts as taggable on" gem and it's working perfectly. The issue I'm having is trying to style the individual tags in the list. I have the code below but it applys the pill style to the entire list rather than each tag. I have tried applying it to the "t" in the loop but its not working. Any help would be appriciated.

<%= raw article.tag_list.map { |t| link_to t, tag_path(t) }.join(', ') %>

here is what this is showing.

http://i65.tinypic.com/30bmz9w.png

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.