Skip to content

Instantly share code, notes, and snippets.

@bertomartin
Forked from Bodacious/application.html.erb
Created February 8, 2013 19:18
Show Gist options
  • Save bertomartin/4741256 to your computer and use it in GitHub Desktop.
Save bertomartin/4741256 to your computer and use it in GitHub Desktop.
...
<aside id="right">
<nav id="tag_cloud">
<h3>Browse by topic:</h3>
<% tag_cloud(tags, %w(tag1 tag2 tag3 tag4 tag5 tag6)) do |tag, tag_class| %>
<%= link_to tag.name, tagged_blog_posts_path(tag: tag.name), :class => "tag #{tag_class}" %>
<% end %>
</nav>
</aside>
...
module BlogPostsHelper
include ActsAsTaggableOn::TagsHelper
def tags
@tags ||= Blogit::Post.tag_counts_on(:tags)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment