我在Rails 4.2中使用Apartment gem。我如何让用户销毁他们的整个子域帐户?
我知道如何销毁个人用户,但我如何才能让管理员也销毁他们的子域?
在创建操作中,我有:
Apartment::Tenant.create(@account.subdomain)
Apartment::Tenant.switch(@account.subdomain)
那么我可以在销毁操作中执行例如Apartment::Tenant.delete吗?
Apart没有删除/销毁方法,请使用以下方法:
Apartment::Tenant.drop("schema_name")