discourse/app/serializers/category_topic_serializer.rb

12 lines
222 B
Ruby
Raw Normal View History

2013-04-03 23:45:53 +08:00
require_dependency 'pinned_check'
class CategoryTopicSerializer < ListableTopicSerializer
2013-02-07 23:45:24 +08:00
2013-04-03 23:45:53 +08:00
attributes :visible, :closed, :archived, :pinned
2013-02-06 03:16:51 +08:00
2013-04-03 23:45:53 +08:00
def pinned
PinnedCheck.new(object, object.user_data).pinned?
end
2013-02-06 03:16:51 +08:00
end