Corrected returned value of EvaluationMethods#evaluators_for method#57
Corrected returned value of EvaluationMethods#evaluators_for method#57neilmarion wants to merge 1 commit intotwitter:masterfrom
Conversation
|
Hi @neilmarion Thank you for the PR. I don't quite understand why your sql query looks like that. If you take a look at the line you removed: self.evaluations.for(srn).includes(:source).map(&:source)It is getting evaluators, i.e. source. And the spec is passing (line 89). Therefore, I'm not convinced this is a bug in the gem yet. Please double check if this is a bug belongs to the gem or your application. (By the way, your code is not generic enough. It is assuming a source is User.) |
|
Sorry for the non-generic code. I was probably in a hurry when I did the PR. Here's how my code look like (involving your gem) User https://github.com/neilmarion/paano/blob/master/app/models/user.rb Post https://github.com/neilmarion/paano/blob/master/app/models/post.rb Question https://github.com/neilmarion/paano/blob/master/app/models/question.rb Answer https://github.com/neilmarion/paano/blob/master/app/models/answer.rb I feel like I've done everything already to decode your gem. I've actually encountered so many bugs along with using your library. Sorry to have come to a conclusion that your gem is the fault. By the way, this trouble may be caused by the fact that my Post-Question-Answer models are using STI. Will be glad if you could help me sort this out. Thanks! |
|
Neil Marion dela Cruz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Running @answer.evaluators_for(:answer_reputation) in console
invokes
It returns Evaluations not evaluators (in my case 'users') as opposed to the wiki.
#56