Ahoy, having a bit of difficulty w/ the acts as taggable GEM.
I was able to create a tagcloud, but now i want to filter items by tags.
in my controller i have
def show_tagged_with
<-- snip snip -->
@items = Item.find_tagged_with( :any => params[:tag_name])
@categories = Category.find_all
@tag_name = params[:tag_name]
@tagged_items = Item.tags_count(:limit => 100)
end
IN the VIEW
<% @items.each do |item| %>
<%= render :partial => ‘list_stripes’, :locals => { :item => item } %>
<% end %>
Where the partial _list_stripes.rthml is a list of items
<td><%=h item.tag_names.join(" ") %></td>
<td><%=h item.created_on %></td>
<td><%=h item.category.name %></td>
But i get an error
“undefined method `tag_names’ for #Array:0x3673b08”
any ideas?