citusdata / citusdata/activerecord-multi-tenant

Rails 7.1 - error when multi_tenant defined in abstract class

Open
#230 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
759
Forks
113
PR merge metrics
No merged PRs in 30d

Description

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:

image

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.