You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Rails 7.1, I'm getting this error when running my tests:
TypeError:
no implicit conversion of nil into String
I've tracked it down to this definition of multi_tenant in the parent abstract class:
I can confirm that MultiTenant.current_tenant is set. Moving the method directly to the subclass causes it to start working again. Removing the multi_tenant method will give me the expected invalid model (because the organization is nil).
I'm not seeing anything about this in the changelog... am I missing something?
The text was updated successfully, but these errors were encountered:
@joshforbes@carldr
I was also struggling with almost the same issue!
Now I updated to Rails 7.1 by replacing the abstract class with a mix-in. The code is as follows:
moduleMultiTenantOrganizationextendActiveSupport::Concernincludeddomulti_tenant:organizationbelongs_to:organizationendendclassAccount < ApplicationRecord# Previously, an abstract class was inherited hereincludeMultiTenantOrganization# account implementation...end
After updating to Rails 7.1, I'm getting this error when running my tests:
I've tracked it down to this definition of
multi_tenant
in the parent abstract class:I can confirm that MultiTenant.current_tenant is set. Moving the method directly to the subclass causes it to start working again. Removing the
multi_tenant
method will give me the expected invalid model (because the organization is nil).I'm not seeing anything about this in the changelog... am I missing something?
The text was updated successfully, but these errors were encountered: