discourse/app/serializers/badge_index_serializer.rb
Sam c8284170ad FEATURE: badge grouping UI
FIX: not loading more badges on badge show page
2014-07-18 15:46:36 +10:00

13 lines
228 B
Ruby

class BadgeIndexSerializer < BadgeSerializer
attributes :has_badge
has_one :badge_grouping
def include_has_badge?
@options[:user_badges]
end
def has_badge
@options[:user_badges].include?(object.id)
end
end