2
0
Fork 0
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:
Neil Lalonde 2017-11-14 16:39:07 -05:00
parent c90c4b9703
commit b37e40eea9
15 changed files with 185 additions and 8 deletions

View file

@ -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