2019-09-04 11:56:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ReviewableScoreExplanationSerializer < ApplicationSerializer
|
|
|
|
attributes(
|
|
|
|
:user_id,
|
|
|
|
:type_bonus,
|
|
|
|
:trust_level_bonus,
|
|
|
|
:take_action_bonus,
|
|
|
|
:flags_agreed,
|
|
|
|
:flags_disagreed,
|
|
|
|
:flags_ignored,
|
|
|
|
:user_accuracy_bonus,
|
|
|
|
:score
|
|
|
|
)
|
|
|
|
|
|
|
|
def user_accuracy_bonus
|
2019-09-17 14:47:56 -04:00
|
|
|
ReviewableScore.calc_user_accuracy_bonus(object.flags_agreed, object.flags_disagreed)
|
2019-09-04 11:56:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|