Skip to content

Commit

Permalink
chore: fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Oct 15, 2020
1 parent 36bbf5f commit bdcf076
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion documentation/topics/notifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ defmodule ExampleNotifier do
end
```

### Including a notifier in a resource

```elixir
defmodule MyResource do
use Ash.Resource,
notifiers: [ExampleNotifier]
end
```

## Transactions

Api calls involving resources who's datalayer supports transactions (like Postgres), notifications are saved up and sent after the transaction is closed. For example, the api call below ultimately results in many many database calls.
Expand Down Expand Up @@ -67,5 +76,4 @@ case result do
{:error, error} ->
handle_error(error)
end

```

0 comments on commit bdcf076

Please sign in to comment.