conversation_serializer.rb 303 B

123456789101112
  1. # frozen_string_literal: true
  2. class REST::ConversationSerializer < ActiveModel::Serializer
  3. attributes :id, :unread
  4. has_many :participant_accounts, key: :accounts, serializer: REST::AccountSerializer
  5. has_one :last_status, serializer: REST::StatusSerializer
  6. def id
  7. object.id.to_s
  8. end
  9. end