Guest User

Untitled

a guest
Aug 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. Showing only the most popular tags in the acts_as_taggable_on tag cloud
  2. def styles_tag_cloud
  3. @tags = Tattoo.tag_counts_on(:styles).limit(40)
  4. end
  5.  
  6. <% tag_cloud(styles_tag_cloud, %w(css1 css2 css3 css4)) do |tag, css_class| %>
  7. <%= link_to tag.name, { :action => :tagged, :controller =>:index, :id => tag.name }, :class => css_class %>
  8. <% end %>
  9.  
  10. @tag_counts = Post.tag_counts_on(:tags).limit(10)
Add Comment
Please, Sign In to add comment