logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

search_serializer.rb (283B)


  1. # frozen_string_literal: true
  2. class REST::SearchSerializer < ActiveModel::Serializer
  3. attributes :hashtags
  4. has_many :accounts, serializer: REST::AccountSerializer
  5. has_many :statuses, serializer: REST::StatusSerializer
  6. def hashtags
  7. object.hashtags.map(&:name)
  8. end
  9. end