From cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 3 Apr 2013 22:08:19 +0200 Subject: Massive changes to the switchboard. --- app/serializers/switchboard_serializer.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/serializers/switchboard_serializer.rb') diff --git a/app/serializers/switchboard_serializer.rb b/app/serializers/switchboard_serializer.rb index 2912a56..600c79a 100644 --- a/app/serializers/switchboard_serializer.rb +++ b/app/serializers/switchboard_serializer.rb @@ -1,7 +1,8 @@ class SwitchboardSerializer < ActiveModel::Serializer - attributes :id, :name - - embed :ids + embed :ids, :include => true - has_many :switchboard_entries, :key => :switchboard_entrys + attributes :id, :name + has_many :switchboard_entries + has_many :sip_accounts, :through => :switchboard_entries + has_many :phone_numbers end -- cgit v1.2.3