-
Notifications
You must be signed in to change notification settings - Fork 234
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
Show previous rating instead of average? #27
Comments
Would love this feature as well. |
We created this solution that draws heavily upon the ratings_for feature already built in: def rating_for_user(rateable_obj, rating_user, dimension = nil, options = {}) disable_after_rate = options[:disable_after_rate] || false readonly=false content_tag :div, '', "data-dimension" => dimension, :class => "star", "data-rating" => stars, Rather than calculate the average, this will search for an individual rating by the rating user and the rateable object (optionally, any rating dimension). |
I actually forked this and re-wrote to my liking (changed the way it handled re-rating by the same user, averages, shows the previous rating for the user instead of the average, etc), but I'm thinking it is too use-case-specific to do a pull request to merge back into the master branch. Also it was my first time collaborating on a public repo, so I did it all wrong and github doesn't show the diffs so it is hard to see what I changed. When I have time I'll do it properly so people can use my fork with confidence if their use case deems it necessary. I use my fork in a production app and it works well for our needs. |
It would nice if there was the option to show the user's previous rating instead of the average.
The text was updated successfully, but these errors were encountered: