2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-08-25 13:38:20 -04:00
|
|
|
class BasicUserBadgeSerializer < ApplicationSerializer
|
|
|
|
attributes :id, :granted_at, :count, :grouping_position
|
|
|
|
|
|
|
|
has_one :badge
|
|
|
|
|
|
|
|
def include_count?
|
|
|
|
object.respond_to? :count
|
|
|
|
end
|
|
|
|
|
|
|
|
def grouping_position
|
|
|
|
object.badge.badge_grouping.position
|
|
|
|
end
|
|
|
|
end
|