mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
In
be5798f6d8
we standardized the way we counted a user's accepted answers.
This makes it a little bit more obvious by refactoring the query into it
own files (queries.rb) and using that in both the user card and user
summary serializers.
Also improved the specs coverage.
Internal ref - t/149121
9 lines
190 B
Ruby
Vendored
9 lines
190 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module DiscourseSolved::UserSummaryExtension
|
|
extend ActiveSupport::Concern
|
|
|
|
def solved_count
|
|
DiscourseSolved::Queries.solved_count(@user.id)
|
|
end
|
|
end
|