summaryrefslogtreecommitdiff
path: root/app/controllers/tenants_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 19:47:15 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 19:47:15 +0100
commited8953f05638c43d9c1e62cf3d3ff7da158f4c20 (patch)
treeac0e481aaa45688dd7c6cecc9ec29b5f4906c585 /app/controllers/tenants_controller.rb
parentcc2a6de28e676b5afb73f3fafb5b417301927cc9 (diff)
Added a First Steps page.
Diffstat (limited to 'app/controllers/tenants_controller.rb')
-rw-r--r--app/controllers/tenants_controller.rb21
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