discourse/app/serializers/category_topic_serializer.rb

13 lines
242 B
Ruby
Raw Normal View History

2013-04-03 11:45:53 -04:00
require_dependency 'pinned_check'
class CategoryTopicSerializer < ListableTopicSerializer
2013-02-07 10:45:24 -05:00
2013-04-03 11:45:53 -04:00
attributes :visible, :closed, :archived, :pinned
2013-02-05 14:16:51 -05:00
has_one :category
2013-04-03 11:45:53 -04:00
def pinned
PinnedCheck.new(object, object.user_data).pinned?
end
2013-02-05 14:16:51 -05:00
end