mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 18:43:44 +08:00
ad082cea70
- Support for a popup that shows similar topics - Cleaned up a lot of Javascript - Cleaned up use of Promises
12 lines
292 B
Ruby
12 lines
292 B
Ruby
class SuggestedTopicSerializer < ListableTopicSerializer
|
|
|
|
attributes :archetype, :like_count, :views, :last_post_age
|
|
has_one :category, embed: :objects
|
|
|
|
def last_post_age
|
|
return nil if object.last_posted_at.blank?
|
|
AgeWords.age_words(Time.now - object.last_posted_at)
|
|
end
|
|
|
|
end
|