All threads / Bootstrap class on individual tags in tag list

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

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.