From adc2404f7cf36b6b457032ca3e0aacc9153e9707 Mon Sep 17 00:00:00 2001 From: Marvin Ahlgrimm Date: Wed, 17 Jul 2024 15:43:34 +0200 Subject: [PATCH] Allow turbo stream instances to be created from `Marten::Model` --- spec/marten-turbo/turbo_stream_spec.cr | 19 ++++++++++++ src/marten_turbo/app.cr | 1 + src/marten_turbo/concerncs/dom_identifier.cr | 31 +++++++++++++++++++ .../template/tag/concerncs/dom_identifier.cr | 31 ------------------- src/marten_turbo/template/tag/dom_id.cr | 2 -- src/marten_turbo/template/tag/turbo_stream.cr | 2 -- src/marten_turbo/turbo_stream.cr | 25 +++++++++++++-- 7 files changed, 73 insertions(+), 38 deletions(-) create mode 100644 src/marten_turbo/concerncs/dom_identifier.cr delete mode 100644 src/marten_turbo/template/tag/concerncs/dom_identifier.cr diff --git a/spec/marten-turbo/turbo_stream_spec.cr b/spec/marten-turbo/turbo_stream_spec.cr index a359e3a..ee83e8b 100644 --- a/spec/marten-turbo/turbo_stream_spec.cr +++ b/spec/marten-turbo/turbo_stream_spec.cr @@ -49,6 +49,16 @@ describe MartenTurbo::TurboStream do stream.to_s.should_not contain "