mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
docs: update tenancy docs
This commit is contained in:
parent
7507cdd731
commit
f67749ccf1
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ Ash.Changeset.for_create(..., tenant: %MyApp.Organization{id: id})
|
|||
# in Organization resource
|
||||
|
||||
defimpl Ash.ToTenant do
|
||||
def to_tenant(resource, %MyApp.Accounts.Organization{id: id}) do
|
||||
def to_tenant(%{id: id}, resource) do
|
||||
if Ash.Resource.Info.data_layer(resource) == AshPostgres.DataLayer
|
||||
&& Ash.Resource.Info.multitenancy_strategy(resource) == :context do
|
||||
"org_#{id}"
|
||||
|
|
Loading…
Reference in a new issue