mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 11:32:24 -05:00
c8284170ad
FIX: not loading more badges on badge show page
12 lines
228 B
Ruby
12 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
|