Class: SocialNetworking::Serializers::OnTheMindStatementSerializer
- Inherits:
-
Serializer
- Object
- Serializer
- SocialNetworking::Serializers::OnTheMindStatementSerializer
- Defined in:
- app/models/social_networking/serializers/on_the_mind_statement_serializer.rb
Overview
Serializes OnTheMindStatement models.
Instance Attribute Summary
Attributes inherited from Serializer
Instance Method Summary collapse
Methods inherited from Serializer
Constructor Details
This class inherits a constructor from SocialNetworking::Serializers::Serializer
Instance Method Details
#to_serialized ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/models/social_networking/serializers/on_the_mind_statement_serializer.rb', line 6 def to_serialized { className: "SocialNetworking::OnTheMindStatement", id: model.id, createdAt: model.created_at, createdAtRaw: model.created_at.to_i, participantId: model.participant_id, isAdmin: model.participant.is_admin, summary: "said #{model.description}", description: model.description, comments: CommentSerializer.from_collection(model.comments), likes: LikeSerializer.from_collection(model.likes) } end |