diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-30 19:47:15 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-30 19:47:15 +0100 |
commit | ed8953f05638c43d9c1e62cf3d3ff7da158f4c20 (patch) | |
tree | ac0e481aaa45688dd7c6cecc9ec29b5f4906c585 /app/controllers/tenants_controller.rb | |
parent | cc2a6de28e676b5afb73f3fafb5b417301927cc9 (diff) |
Added a First Steps page.
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 |