discourse/app/serializers/user_badge_serializer.rb

8 lines
234 B
Ruby
Raw Normal View History

2014-03-05 20:52:20 +08:00
class UserBadgeSerializer < ApplicationSerializer
attributes :id, :granted_at
has_one :badge
2014-04-18 00:27:42 +08:00
has_one :user, serializer: BasicUserSerializer, root: :users
2014-03-05 20:52:20 +08:00
has_one :granted_by, serializer: BasicUserSerializer, root: :users
end