Multitenancy and no_attributes? relationship option
Reading through the docs, I encountered the part about the
no_attributes?
option while declaring relationships.
Reading this, I was under the impression that I wouldn't have to specify a belong_to
on my resource, but I encounter this error if I don't define one:
Am I missing something or do I still need to define a belong_to
for my Plane
resource?
For reference, my airline
resource has the following:
5 Replies
Well, if you want to use attribute multitenancy you will still need an attribute to exist to store the tenant in
In the case of attribute multitenancy there isn’t much point to using the
no_attributes?
option although you technically can. But you’d need to do something like add attribute :organization_id, …
at a minimum.Oh right, I guess the example would be if I was using a
:context
strategy to implement multitenancy?Yeah, exactly
I totally forgot about that other option, that explains it, thanks! (quite the response time there 😄 )
Gotta go fast 😂