Skip to content

Commit 714cedb

Browse files
committed
Fix pipe_through example
1 parent 7165eb2 commit 714cedb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

documentation/dsls/DSL-Ash.Resource.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ pipe_through [:change_state]
11211121
```
11221122

11231123
```
1124-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
1124+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
11251125
11261126
```
11271127

@@ -1322,7 +1322,7 @@ pipe_through [:change_state]
13221322
```
13231323

13241324
```
1325-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
1325+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
13261326
13271327
```
13281328

@@ -1647,7 +1647,7 @@ pipe_through [:change_state]
16471647
```
16481648

16491649
```
1650-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
1650+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
16511651
16521652
```
16531653

@@ -1957,7 +1957,7 @@ pipe_through [:change_state]
19571957
```
19581958

19591959
```
1960-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
1960+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
19611961
19621962
```
19631963

@@ -2250,7 +2250,7 @@ pipe_through [:change_state]
22502250
```
22512251

22522252
```
2253-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
2253+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
22542254
22552255
```
22562256

lib/ash/resource/dsl.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ defmodule Ash.Resource.Dsl do
522522
pipe_through [:change_state]
523523
""",
524524
"""
525-
pipe_through [:change_state], where: expr(^actor(:role) == :super_user)
525+
pipe_through [:change_state], where: attribute_equals(:role, :super_user)
526526
"""
527527
],
528528
imports: [

0 commit comments

Comments
 (0)