From 3cb96546bc412533b557c72f39f8d16769878d1f Mon Sep 17 00:00:00 2001 From: Marvin Ahlgrimm Date: Fri, 12 Jul 2024 19:21:39 +0200 Subject: [PATCH] Update `README.md` --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ffc645c..a1c9486 100644 --- a/README.md +++ b/README.md @@ -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 ```