query_result_serializer.rb 240 B

1234567891011
  1. # frozen_string_literal: true
  2. class REST::Keys::QueryResultSerializer < ActiveModel::Serializer
  3. attributes :account_id
  4. has_many :devices, serializer: REST::Keys::DeviceSerializer
  5. def account_id
  6. object.account.id.to_s
  7. end
  8. end