Form integration

Let me know if you don't know how to use this partial to do new/edit, and I'll elaborate.

Now you can create tags for stuff. How about displaying them? Couple options, I'll go through the most explicit (a TagsController with index and show actions), but they can be rolled up into other controllers/actions.

It's unfortunate we have to do this slightly awkward workaround with Post.tagged_with(@tag.name) in tags#show. The ActsAsTaggableOn::Tag model does not have a built-in relationship with its taggable types (this is a necessary consequence of some polymorphism which we're not using here). We could add one for Post, but this way is easier to demonstrate.

Tags Views

app/views/acts_as_taggable_on/tags/_tag.html.erb

<%= link_to tag.name, tag_path(tag) %>

app/views/tags/index.html.erb

<h1>Tags</h1>
<%= render @tags %>

app/views/tags/show.html.erb

<h1><%= @tag.name %></h1>
<div><%= render @posts %></div>

Note the partial path is acts_as_taggable_on/tags/tag. This is so we can just say render @tags and let rails do its implicit magic. There are other ways to organize everything, but this is the simplest.

And that should be it. It'll look shitty, but I hope you can figure out how to elaborate on this once you have it working. If anything here is assuming familiarity with something you don't have, ask and I will gladly elaborate.