summaryrefslogtreecommitdiff
path: root/app/serializers/sip_account_serializer.rb
blob: 7465a17ac47f345767a4a90d36829b2dfecaedda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class SipAccountSerializer < ActiveModel::Serializer
  embed :ids, :include => true

  attributes :id, :auth_name, :caller_name, :sip_accountable_id, :is_registrated
  has_many :phone_numbers
  has_many :calls

  def is_registrated
    if object.registration
      true
    else
      false
    end
  end
end