2014-08-11 16:59:00 -04:00
|
|
|
class AboutSerializer < ApplicationSerializer
|
2019-01-15 06:55:22 -05:00
|
|
|
|
|
|
|
class UserAboutSerializer < BasicUserSerializer
|
|
|
|
attributes :title, :last_seen_at
|
|
|
|
end
|
|
|
|
|
|
|
|
has_many :moderators, serializer: UserAboutSerializer, embed: :objects
|
|
|
|
has_many :admins, serializer: UserAboutSerializer, embed: :objects
|
2014-08-11 16:59:00 -04:00
|
|
|
|
2014-08-11 18:15:35 -04:00
|
|
|
attributes :stats,
|
|
|
|
:description,
|
|
|
|
:title,
|
|
|
|
:locale,
|
2014-11-24 01:54:17 -05:00
|
|
|
:version,
|
|
|
|
:https
|
2015-07-07 00:52:19 -04:00
|
|
|
|
|
|
|
def stats
|
|
|
|
object.class.fetch_cached_stats || Jobs::AboutStats.new.execute({})
|
|
|
|
end
|
2014-08-11 16:59:00 -04:00
|
|
|
end
|