diff options
Diffstat (limited to 'app/controllers/tenants_controller.rb')
-rw-r--r-- | app/controllers/tenants_controller.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb index 37874b2..b6a96b7 100644 --- a/app/controllers/tenants_controller.rb +++ b/app/controllers/tenants_controller.rb @@ -8,6 +8,7 @@ class TenantsController < ApplicationController def show @tenant = Tenant.find(params[:id]) @gateways = Gateway.order(:updated_at) + @backup_jobs = BackupJob.order(:finished_at).last(5) end def new @@ -27,17 +28,17 @@ class TenantsController < ApplicationController if @tenant.save # Become a member of this tenant. # - @tenant.tenant_memberships.create(:user_id => @current_user.id) + @tenant.tenant_memberships.create(:user_id => current_user.id) # Groups # admin_group = @tenant.user_groups.create(:name => t('gemeinschaft_setups.initial_setup.admin_group_name')) - admin_group.users << @current_user + admin_group.users << current_user user_group = @tenant.user_groups.create(:name => t('gemeinschaft_setups.initial_setup.user_group_name')) - user_group.users << @current_user + user_group.users << current_user - @current_user.update_attributes!(:current_tenant_id => @tenant.id) + current_user.update_attributes!(:current_tenant_id => @tenant.id) # Generate the internal_extensions # |