Skip to content

Commit

Permalink
Update documentation about tag_cloud helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sobrinho authored and tomeric committed Dec 14, 2009
1 parent e86070e commit 8dbfc4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.rdoc
Expand Up @@ -151,6 +151,12 @@ A helper is included to assist with generating tag clouds.

Here is an example that generates a tag cloud.

Helper:

module PostsHelper
include TagsHelper
end

Controller:

class PostController < ApplicationController
Expand All @@ -160,6 +166,7 @@ Controller:
end

View:

<% tag_cloud @tags, %w(css1 css2 css3 css4).each do |tag, css_class| %>
<%= link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class %>
<% end %>
Expand Down Expand Up @@ -187,5 +194,6 @@ CSS:
* slainer68 - STI fix
* harrylove - migration instructions and fix-ups
* lawrencepit - cached tag work
* sobrinho - fixed tag_cloud helper

Copyright (c) 2007-2009 Michael Bleigh (http://mbleigh.com/) and Intridea Inc. (http://intridea.com/), released under the MIT license

0 comments on commit 8dbfc4b

Please sign in to comment.