<commit_before>class Api::ContactsSerializer < ActiveModel::Serializer
  
  class Api::ContactsSerializer::Show < ActiveModel::Serializer
    attributes(:email, :name, :text)
  end

  class Api::ContactsSerializer::Index < ActiveModel::Serializer
    attributes(:id, :email, :name, :text)

    def text
      MarkdownHelper.markdown_api(object.text)
    end
  end
end<commit_msg>Include avatar and users in contact API<commit_after>class Api::ContactsSerializer < ActiveModel::Serializer
  class Api::ContactsSerializer::Show < ActiveModel::Serializer
    attributes(:email, :name, :text, :avatar)
    attribute(:users) { object.users.collect { |u| u.firstname + ' ' + u.lastname } }
  end

  class Api::ContactsSerializer::Index < ActiveModel::Serializer
    attributes(:id, :email, :name, :text, :avatar)
    attribute(:users) { object.users.collect { |u| u.firstname + ' ' + u.lastname } }

    def text
      MarkdownHelper.markdown_api(object.text)
    end
  end
end
{'fraction_non_alphanumeric': 0.12564366632337795, 'fraction_numerical': 0.0, 'mean_word_length': 4.651162790697675, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1202985', 'n_tokens_mistral': 294, 'n_tokens_neox': 292, 'n_words': 63}