mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-23 14:02:33 -05:00
99c11e2184
Also clean up UserBadgesController so it isn't doing two things in one method
13 lines
265 B
Ruby
13 lines
265 B
Ruby
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
|