Tony Vidmer's Profile

Comments by Tony Vidmer

As much as I love Ryan and all the Railscasts, this one is a bit confusing, for this reason:

When Ryan talks about "reputation_value_for" (now "reputation_for") as giving him the "total number of votes," it is in fact giving him the SUM OF THE VOTE VALUES. So, if one is looking for the actual total number of votes, regardless of vote value, the returned value is incorrect.

In fact, as far as I can tell, there is no generic way to get the total number of votes on a model without assigning a constant "1" to a vote tally value and using reputation_for(:vote_tally). So, in order to end up with:

78% of 281 voters like this Haiku. You like it, too.

...there is a need to add a THIRD reputation to get the count of ReputationSystem::Evaluations on the Haiku model, since we need to use: