Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get current tenant when using Appartment gem in multi-tenancy Rails 4

How can I find out which tenant (schema) is the current one when Apartment was initialized according to request

like image 334
Sergiy Seletskyy Avatar asked Jul 23 '14 12:07

Sergiy Seletskyy


1 Answers

Apartment::Tenant.current

P. S. Thank you @pa-buisson

like image 161
Sergiy Seletskyy Avatar answered Sep 29 '22 03:09

Sergiy Seletskyy