Skip to content

Commit d4c4936

Browse files
committed
updating docs
1 parent fb01bb6 commit d4c4936

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,19 @@ It is called when fetching the resources for the index page.
538538

539539
The `custom_show_query/3` is identifical to `custom_index_query/3`, but works when fetching a single resource in the show/edit page.
540540

541+
It's also possible to pass `opts` to the Repo operation, in this case, you just have to return a tuple instead, like below:
542+
543+
```elixir
544+
defmodule MyApp.Accounts.TenantAdmin do
545+
def custom_index_query(_conn, _schema, query) do
546+
{query, skip_tenant_id: true}
547+
end
548+
549+
def custom_show_query(_conn, _schema, query) do
550+
{query, skip_tenant_id: true}
551+
end
552+
end
553+
```
541554

542555
### Extensions
543556

0 commit comments

Comments
 (0)