about summary refs log tree commit diff
path: root/app/serializers/rest/keys/query_result_serializer.rb
blob: 8f8bdde289fdb2f0a8c1279c2c0b1845486c736f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class REST::Keys::QueryResultSerializer < ActiveModel::Serializer
  attributes :account_id

  has_many :devices, serializer: REST::Keys::DeviceSerializer

  def account_id
    object.account.id.to_s
  end
end