I use act_as_taggable_on to add tags to posts, other plugins / gems with tags do not work with rails. 3. I can edit / display tags in the message model, and the tag controller displays messages marked with the name ie / tags / tag name-post /. I want to use tags on message pages in links to display other posts with the same tag. I followed a tutorial on "just rails 2" sites that uses act_as_taggable_on_steroids, but I was stuck with the following error:
ActionView::MissingTemplate in Posts#show Missing partial acts_as_taggable_on/tags/tag with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "../app/views" Extracted source (around line #28): 25: <div id="tags"> 26: <% unless @post.tag_list.empty? %> 27: <p class="tags"> 28: <%= render :partial => @post.tags %></p> 29: <% end %>
...
class Post < ActiveRecord::Base ... acts_as_taggable_on :tags end class TagsController < ApplicationController def show @post = Post.tagged_with(params[:id]) end end
_tag.html.erb
<%= link_to, tag_path(:id => tag.name) %>
posts / show.html.erb
<div id="tags"> <% unless @post.tag_list.empty? %> <p class="tags"> <%= render :partial => @post.tags %></p> <% end %> </div>
Also trying to add a tag cloud in the /index.html tags, as described here http://github.com/mbleigh/acts-as-taggable-on gives me a routing error;
No route matches {:action=>"tag", :id=>"news", :controller=>"tags"}
source share