discourse/app/serializers/about_serializer.rb

16 lines
416 B
Ruby
Raw Normal View History

2014-08-11 15:59:00 -05:00
class AboutSerializer < ApplicationSerializer
2015-02-23 08:56:30 -06:00
has_many :moderators, serializer: UserNameSerializer, embed: :objects
has_many :admins, serializer: UserNameSerializer, embed: :objects
2014-08-11 15:59:00 -05:00
2014-08-11 17:15:35 -05:00
attributes :stats,
:description,
:title,
:locale,
:version,
:https
2015-07-06 23:52:19 -05:00
def stats
object.class.fetch_cached_stats || Jobs::AboutStats.new.execute({})
end
2014-08-11 15:59:00 -05:00
end