From 710dae14165844fc1a041f6c649c0296e4f2b409 Mon Sep 17 00:00:00 2001 From: Marvin Ahlgrimm Date: Fri, 22 Mar 2024 11:41:45 +0100 Subject: [PATCH] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43a224a..6a3bf10 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,12 @@ Marten Turbo -[![GitHub Release](https://img.shields.io/github/v/release/treagod/marten-turbo?style=flat)](https://github.com/treagod/marten-turbo/releases) +[![GitHub Release](https://img.shields.io/github/v/release/treagod/marten-turbo?style=flat)](https://github.com/treagod/marten-turbo/releases) [![Marten Turbo Specs](https://github.com/treagod/marten-turbo/actions/workflows/specs.yml/badge.svg)](https://github.com/treagod/marten-turbo/actions/workflows/specs.yml) [![QA](https://github.com/treagod/marten-turbo/actions/workflows/qa.yml/badge.svg)](https://github.com/treagod/marten-turbo/actions/workflows/qa.yml) +Marten Turbo provides helpers to interact with Turbo applications using the Marten Framework. + ## Installation Simply add the following entry to your project's `shard.yml`: @@ -51,7 +53,7 @@ Identifier will respect your namespace of the model. I.e. if you have an Article Marten Turbo provides an extension to the generic Marten handlers: -__Record Creation__: To create a record, use +__Record Creation__: To create a record, use ```crystal class ArticleCreateHandler < MartenTurbo::Handlers::RecordCreate @@ -67,7 +69,7 @@ Notice how we use `MartenTurbo::Handlers::RecordCreate` instead of `Marten::Hand Also the `#turbo_stream_name` class method gives you the option to define a turbo stream template which is rendered instead of the normal template if a turbo request is made. -__Record Update__: To update a record, use +__Record Update__: To update a record, use ```crystal class ArticleUpdateHandler < MartenTurbo::Handlers::RecordUpdate @@ -79,7 +81,7 @@ class ArticleUpdateHandler < MartenTurbo::Handlers::RecordUpdate end ``` -__Record Deletion__: To delete a record, use +__Record Deletion__: To delete a record, use ```crystal class ArticleDeleteHandler < MartenTurbo::Handlers::RecordDelete