diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-30 21:03:48 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-30 21:03:48 +0100 |
commit | f04aa92778dca7f71ca656235885095b13dd3535 (patch) | |
tree | b0ac9cf3dfecbbdb0209c1204054adcac861f001 /app/controllers/tenants_controller.rb | |
parent | f3c3e77eaa2b82567f02601b6f66177208674181 (diff) | |
parent | 508871c01cbf02bf6d8d7056c2d5a70e4d67eebf (diff) |
Merge branch 'develop'5.0.2
Diffstat (limited to 'app/controllers/tenants_controller.rb')
-rw-r--r-- | app/controllers/tenants_controller.rb | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb index 724d179..7bb8ecd 100644 --- a/app/controllers/tenants_controller.rb +++ b/app/controllers/tenants_controller.rb @@ -58,14 +58,27 @@ class TenantsController < ApplicationController end if Delayed::Job.count > 0 - redirect_to @tenant, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs', + if SipAccount.any? || Phone.any? + redirect_to @tenant, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs', :resource => @tenant, :amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count ) - else - redirect_to @tenant, :notice => t('tenants.controller.successfuly_created', - :resource => @tenant + else + redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs', + :resource => @tenant, + :amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count ) + end + else + if SipAccount.any? || Phone.any? + redirect_to @tenant, :notice => t('tenants.controller.successfuly_created', + :resource => @tenant + ) + else + redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created', + :resource => @tenant + ) + end end else render :new |