Class: TopicEmbedSerializer
- Inherits:
-
ApplicationSerializer
- Object
- ActiveModel::Serializer
- ApplicationSerializer
- TopicEmbedSerializer
- Defined in:
- app/serializers/topic_embed_serializer.rb
Instance Method Summary collapse
Methods inherited from ApplicationSerializer
expire_cache_fragment!, fragment_cache
Methods inherited from ActiveModel::Serializer
Instance Method Details
#comment_count ⇒ Object
10 11 12 |
# File 'app/serializers/topic_embed_serializer.rb', line 10 def comment_count object.topic.posts_count - 1 end |
#topic_slug ⇒ Object
6 7 8 |
# File 'app/serializers/topic_embed_serializer.rb', line 6 def topic_slug object.topic.slug end |