summaryrefslogtreecommitdiff
path: root/app/models/switchboard_entry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/switchboard_entry.rb')
-rw-r--r--app/models/switchboard_entry.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/switchboard_entry.rb b/app/models/switchboard_entry.rb
index 76d002f..faeba8c 100644
--- a/app/models/switchboard_entry.rb
+++ b/app/models/switchboard_entry.rb
@@ -5,6 +5,8 @@ class SwitchboardEntry < ActiveRecord::Base
belongs_to :switchboard, :touch => true
belongs_to :sip_account, :touch => true
+ has_many :phone_numbers, :through => :sip_account
+
validates :switchboard,
:presence => true