summaryrefslogtreecommitdiff
path: root/app/models/switchboard.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/switchboard.rb')
-rw-r--r--app/models/switchboard.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/switchboard.rb b/app/models/switchboard.rb
index cb0c70f..74e2767 100644
--- a/app/models/switchboard.rb
+++ b/app/models/switchboard.rb
@@ -7,6 +7,8 @@ class Switchboard < ActiveRecord::Base
:uniqueness => {:scope => :user_id}
belongs_to :user, :touch => true
+ has_many :switchboard_entries, :dependent => :destroy
+ has_many :sip_accounts, :through => :switchboard_entries
def to_s
self.name.to_s