-
Notifications
You must be signed in to change notification settings - Fork 109
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
Allow for namespaced models. #206
base: main
Are you sure you want to change the base?
Conversation
@gmhawash Thanks so much for the PR! Before I look into this, have you tried using the It should work out like this: expose :certificate, parent: :tenant, model: DB1::Certificate |
@mattpolito the code prevents parent and model to be used at the same time. |
I'd like to remedy the 'incompatible option' situation over adding and additional option for name-spacing. Let me look into that. |
I would be happy to try it if you do it soonish. Thanks |
I'm planning to take a look at it toward the end of the month around the holidays |
Ok let me know when it is ready
… On Dec 5, 2024, at 9:06 AM, Matt Polito ***@***.***> wrote:
I'm planning to take a look at it toward the end of the month around the holidays
—
Reply to this email directly, view it on GitHub <#206 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAALW4UEFUZYXTLRAETBGX32ECBX7AVCNFSM6AAAAABS37WGNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRQHEZTQMJYGI>.
You are receiving this because you were mentioned.
|
@mattpolito Hi Matt, did you get a chance to take a look at this issue? |
@gmhawash I did not, was sick my entire vacation when I was going to look into it. |
Our use case allows for models to be namespaced as we're taking advantage of Rails Multi-Database access. As a result, each database models are namespaced; e.g.,
DB1::Tenant
. We also want to be able to use theparent
orscope
option when we access sub-associations. e.g.,DB1::Tenant.has_many :certificates
, hence:This translates to: