mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FEATURE: show read time in last 60 days
This commit is contained in:
parent
c90c4b9703
commit
b37e40eea9
15 changed files with 185 additions and 8 deletions
|
@ -37,6 +37,7 @@ class UserSummarySerializer < ApplicationSerializer
|
|||
:topic_count,
|
||||
:post_count,
|
||||
:time_read,
|
||||
:recent_time_read,
|
||||
:bookmark_count
|
||||
|
||||
def include_badges?
|
||||
|
@ -48,6 +49,10 @@ class UserSummarySerializer < ApplicationSerializer
|
|||
end
|
||||
|
||||
def time_read
|
||||
AgeWords.age_words(object.time_read)
|
||||
object.time_read
|
||||
end
|
||||
|
||||
def recent_time_read
|
||||
object.recent_time_read
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue