summaryrefslogtreecommitdiff
path: root/app/controllers/sip_accounts_controller.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-26 15:51:35 +0100
committerPeter Kozak <spag@golwen.net>2013-03-26 15:51:35 +0100
commit3833ac1506fb336cd617ec41d25e35c34e74064e (patch)
tree7f865a6529ae42a7e878b34eca8f99b7e65575f2 /app/controllers/sip_accounts_controller.rb
parent78948fc995786dcd1beae8e98573ec8ccba3ae9d (diff)
voicemail refactored
Diffstat (limited to 'app/controllers/sip_accounts_controller.rb')
-rw-r--r--app/controllers/sip_accounts_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index 0d34109..8208a29 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -36,6 +36,7 @@ class SipAccountsController < ApplicationController
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
@sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
+ possible_voicemail_accounts
end
def create
@@ -61,6 +62,7 @@ class SipAccountsController < ApplicationController
end
def edit
+ possible_voicemail_accounts
end
def update
@@ -101,4 +103,9 @@ class SipAccountsController < ApplicationController
end
end
+ def possible_voicemail_accounts
+ @possible_voicemail_accounts = @sip_account.voicemail_accounts
+ @possible_voicemail_accounts = @possible_voicemail_accounts + @sip_account.sip_accountable.voicemail_accounts
+ end
+
end