Skip to content

Commit 5d5d8ca

Browse files
committed
Tweaks docs
1 parent 7ac6768 commit 5d5d8ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/turbo-streams.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ It will build a `remove` Turbo Stream if the model was just deleted (or if it wa
143143
return turbo_stream($comment, 'append');
144144
```
145145

146-
## Turbo Stream & Morph
146+
## Turbo Streams & Morph
147147

148-
Both the `update` and `replace` Turbo Stream actions can specify a `[method="morph"]`, so the action will use DOM morphing instead of the default renderer.
148+
Both the `update` and `replace` Turbo Stream actions can specify a `[method="morph"]` attribute, so the action will use DOM morphing instead of the default renderer.
149+
150+
To generate a Turbo Stream with the `[method="morph"]` attribute, chain the `morph()` method:
149151

150152
```php
151153
turbo_stream()->replace(dom_id($post, 'comments'), view('comments.partials.comment', [

0 commit comments

Comments
 (0)