I can't seem to get the syntax right, what am I doing wrong?
preparations do prepare fn query, context -> case query.tenant do %MyApp.Orgs.Org{id: id} -> query |> Ash.Query.filter(org_id == ^id) _ -> query end end end
preparations do prepare fn query, context -> case query.tenant do %MyApp.Orgs.Org{id: id} -> query |> Ash.Query.filter(org_id == ^id) _ -> query end end end
It yells at me for the
org_id
org_id
var and use of the pin operator. I tried without (
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.