All threads / Hey Guys, What is the best way to add tags and categories to a rails blog application?!

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Hey Guys, What is the best way to add tags and categories to a rails blog application?!

Muhammad asked in Rails

I'm trying to build a blog & portfolio app using rails and I want to add tags to make the content organized, I'm trying to add acts_as_taggable_on but I'm struggling with it so I thought I might ask you guys! Thanks in advance.

You can use acts_as_taggable but you can really get the same functionality with categories and tags using a has_many_through relationship between your content and categories/tags.

You can see an example of how I did this with categories with a simple wiki app I built: here

Join the discussion

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

Join 33,665+ 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.