Class: FlaggedTopicSummarySerializer
- Inherits:
-
ActiveModel::Serializer
- Object
- ActiveModel::Serializer
- FlaggedTopicSummarySerializer
- Defined in:
- app/serializers/flagged_topic_summary_serializer.rb
Instance Method Summary collapse
Methods inherited from ActiveModel::Serializer
Instance Method Details
#flag_counts ⇒ Object
12 13 14 15 16 |
# File 'app/serializers/flagged_topic_summary_serializer.rb', line 12 def flag_counts object.flag_counts.map do |k, v| { post_action_type_id: k, count: v, name_key: PostActionType.types[k] } end end |
#id ⇒ Object
8 9 10 |
# File 'app/serializers/flagged_topic_summary_serializer.rb', line 8 def id topic.id end |
#last_flag_at ⇒ Object
22 23 24 |
# File 'app/serializers/flagged_topic_summary_serializer.rb', line 22 def last_flag_at object.last_flag_at end |
#user_ids ⇒ Object
18 19 20 |
# File 'app/serializers/flagged_topic_summary_serializer.rb', line 18 def user_ids object.user_ids end |