summaryrefslogtreecommitdiff
path: root/app/models/switchboard.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-08 12:09:17 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-03-08 12:09:17 +0100
commit6374c0b3e38dfc74eb1b4a5a1fcc5229eacdcaf2 (patch)
tree016deaf97e961973069a592537594348df7bb5a7 /app/models/switchboard.rb
parentdb9dbf03d88cfbd68ce99a242730b9e870339539 (diff)
Added SwitchboardEntry scaffold. switchboard has_many switchboard_entries
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