Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def tag_cloud
- @tags = Article.tag_counts # returns all the tags used
- end
- <% 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 %>
- module ApplicationHelper
- include TagsHelper
- end
- module ApplicationHelper
- include TagsHelper
- end
Add Comment
Please, Sign In to add comment