1. Cao Li
  2. qutubaike

Source

qutubaike / views / common / _tag_cloud.erb

<div class="tagsblock">
  <h3>标签</h3>
  <% cache 'sidebar_tag_cloud', :expires_in => 12.hour do %>
    <% tags = Article.tag_counts#@group.public_articles.cached_tag_clouds %>
    <% tags.each do |tag| %>
      <%= link_to tag.name, group_tag_path(@group, tag), :rel => 'tag' %>
    <% end %>
  <% end %>
  <%= link_to '更多...', group_tags_path(@group) %>
</div>
<div class="shadow"></div>