I'm using acts_as_taggable_on to add tags to posts, other tagging
plugins/gems don't work with rails 3. I can edit/display tags on the
post model and the tags controller displays the posts tagged by name i.e
/tags/post-tag-name/. The functionality I want is to turn the tags on
the posts pages into links to display the other posts with the same tag.
I followed the tutorial in sitepoints 'simply rails 2' which uses
acts_as_taggable_on_steroids but I'm 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 at tags/index.html as described here
http://github.com/mbleigh/acts-as-taggable-on gives me a routing error
of;

No route matches {:action=>"tag", :id=>"news", :controller=>"tags"}

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to