Class: Cortex::TenantsController

Inherits:
AdminController show all
Defined in:
app/controllers/cortex/tenants_controller.rb

Instance Method Summary collapse

Instance Method Details

#switch_tenantsObject



5
6
7
8
9
10
# File 'app/controllers/cortex/tenants_controller.rb', line 5

def switch_tenants
  current_user.update(active_tenant: Tenant.find(params[:requested_tenant]))
  respond_to do |format|
    format.json { render :json => current_user.active_tenant }
  end
end