Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Problem with Summing-up Reputations #51

Closed
neilmarion opened this issue May 8, 2013 · 3 comments
Closed

Problem with Summing-up Reputations #51

neilmarion opened this issue May 8, 2013 · 3 comments

Comments

@neilmarion
Copy link

I have this in my User model

has_many :evaluations, class_name: "RSEvaluation", as: :source
has_many :questions
has_many :answers

has_reputation :karma,
:source => [
{ :reputation => :questioning_skill },
{ :reputation => :answering_skill } ]

has_reputation :questioning_skill,
:source => { :reputation => :votes, :of => :questions }

has_reputation :answering_skill,
:source => { :reputation => :votes, :of => :answers }

But whenever I user.reputation_for(:karma) I always get 0.0.
No problem with user.reputation_for(:questioning_skill) because I get the correct value.

@ssoulless
Copy link

Same issue, the url you gave is not working, please tell me how did you solve it, it seems that the issue is when you use class_name option in the relationship declaration

#90

@neilmarion
Copy link
Author

@ssoulless Wow this was a long time ago! Sorry, I wasn't able/wouldn't able to drill down on this problem . :(

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

No branches or pull requests

2 participants