discourse/app/serializers/user_badge_serializer.rb

7 lines
171 B
Ruby
Raw Normal View History

2014-03-05 07:52:20 -05:00
class UserBadgeSerializer < ApplicationSerializer
attributes :id, :granted_at
has_one :badge
has_one :granted_by, serializer: BasicUserSerializer, root: :users
end