mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:48:45 +08:00
13 lines
242 B
Ruby
13 lines
242 B
Ruby
require_dependency 'pinned_check'
|
|
|
|
class CategoryTopicSerializer < ListableTopicSerializer
|
|
|
|
attributes :visible, :closed, :archived, :pinned
|
|
has_one :category
|
|
|
|
def pinned
|
|
PinnedCheck.new(object, object.user_data).pinned?
|
|
end
|
|
|
|
end
|