Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag_cloud helper does not generate correct css_tag indices #554

Closed
TheLarkInn opened this issue Jun 10, 2014 · 1 comment
Closed

tag_cloud helper does not generate correct css_tag indices #554

TheLarkInn opened this issue Jun 10, 2014 · 1 comment

Comments

@TheLarkInn
Copy link
Contributor

It looks like .count method is being used and should be .taggings_count. I switched each instance of that method over and it seemed to fix things.

@jerydarkside
Copy link

Maybe it depends on the use. In my case, .taggings_count doesn't generate the correct css_tag indices, while replacing by .count solves my problem. Here is a simplified context - in pseudo code:

Create 5 users with the following tags:

user1.tags = "smart"
user2.tags = "smart"
user3.tags = "smart"
user4.tags = "smart"
user5.tags = "smart, tall"

Create a specific group of users:

group_of_users = [user1, user5]

If I do @tags = group_of_users.tag_counts_on(:tags), then tag_cloud(@tags,... will generate a cloud with the words "smart" and "tall" (ok), but the word "smart" will be bigger than "tall". This is not expected in that case, since I'm in a situation where I just want the tag cloud to be aware of only the two users in the array.
Reverting from .taggings_count to .count does the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants