Acts-as-taggable works fine and that’s it, but I was wondering if there is a way to limit the tag cloud to only the most popular tags? Right, it doesn't seem to be ordering my cloud in the order in which the tags were created.
But it makes sense to have a tag cloud of only the most popular tags.
My controller has:
def styles_tag_cloud
@tags = Tattoo.tag_counts_on(:styles).limit(40)
end
and my opinion has:
<% tag_cloud(styles_tag_cloud, %w(css1 css2 css3 css4)) do |tag, css_class| %>
<%= link_to tag.name, { :action => :tagged, :controller =>:index, :id => tag.name }, :class => css_class %>
<% end %>
But all this displays the first 40 tags created, and then the size of each tag according to how many times it was used
source
share