summaryrefslogtreecommitdiff
path: root/app/serializers/switchboard_serializer.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:08:19 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:09:33 +0200
commitcea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (patch)
treee216a9634c31047e8908a882aed9ff2545ed99e6 /app/serializers/switchboard_serializer.rb
parent64653a9149eca977c16233abb0a472730b94a464 (diff)
Massive changes to the switchboard.
Diffstat (limited to 'app/serializers/switchboard_serializer.rb')
-rw-r--r--app/serializers/switchboard_serializer.rb9
1 files changed, 5 insertions, 4 deletions
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