tag cloud bug for max count resolved #289

Closed
wants to merge 1 commit into from
View
2 lib/acts_as_taggable_on/tags_helper.rb
@@ -6,7 +6,7 @@ def tag_cloud(tags, classes)
return [] if tags.empty?
- max_count = tags.sort_by(&:count).last.count.to_f
+ max_count = [tags.sort_by(&:count).last.count.to_f,1].max
tags.each do |tag|
index = ((tag.count / max_count) * (classes.size - 1))