Ask A Question


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 { |t| link_to t, tag_path(t) }.join(', ') %>

here is what this is showing.

Join the discussion
Create an account Log in

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

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

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

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.