You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.
It may not be built into the system, but you can probably do a custom query against ReputationSystem::Evaluation.all.count replace all with your own filter. Your controller is essentially storing an extra evaluation for each one, which is duplicating data.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am using activerecord_reputation_system gem to rate something, let's call it model X. In app/models/x.rb I have
This lets me view the average rating.
My question: how can I view both average rating and total number of votes for model X? One way would be to add to app/models/x.rb:
and in the controller have:
Is this the best way to do it or is there a better way?
Thanks a lot.
The text was updated successfully, but these errors were encountered: