I have the tag functionality working ok but can't generate a tag_cloud
in my controller:
def tag_cloud
@tags = Article.tag_counts # returns all the tags used
in the view:
<% tag_cloud Article.tag_counts.sort { |x, y| x.name <=> y.name }, %w(x-small small normal large x-large) do |tag, css_class| %>
<%= link_to tag.name, tag_url( :tag => tag.name ), :class => css_class %>
<% end %></code
I always get a undefined method error for tag_cloud