即使租戶已存在,執行Apartment::Tenant.switch!("tenant_name")
時出現錯誤。使用公寓寶石更換租戶時出現錯誤
當我運行公寓:: tenant_names,它返回數組包含["murah5","rahmatullah","test"]
然後我運行Apartment::Tenant.switch!("murah5")
它返回:
Apartment::TenantNotFound: One of the following schema(s) is invalid: "murah5" "public" from /Users/fourtyonestudio/.rvm/gems/ruby-2.4.1/gems/apartment-1.2.0/lib/apartment/adapters/postgresql_adapter.rb:72:in
救援connect_to_new'`
你可以幫我這個案子?