-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 7.1 - error when multi_tenant defined in abstract class #230
Comments
Did you ever find a solution to this, other than moving |
@joshforbes @carldr module MultiTenantOrganization
extend ActiveSupport::Concern
included do
multi_tenant :organization
belongs_to :organization
end
end
class Account < ApplicationRecord # Previously, an abstract class was inherited here
include MultiTenantOrganization
# account implementation...
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: