Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
treagod committed Jul 12, 2024
1 parent 22324a8 commit 3cb9654
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,16 @@ class ArticleUpdateHandler < MartenTurbo::Handlers::RecordUpdate
end
```

__Record Deletion__: To delete a record, use
__Record Deletion__: It's also possible to define a `turbo_stream` method

```crystal
class ArticleDeleteHandler < MartenTurbo::Handlers::RecordDelete
model Article
template_name "articles/delete.html"
turbo_stream_name "articles/delete.turbo_stream.html"
success_route_name "articles"
def turbo_stream
MartenTurbo::TurboStream.remove("article_1")
end
end
```

0 comments on commit 3cb9654

Please sign in to comment.