Basic turbo todo list implementation

Based on:

https://webcrunch.com/posts/digging-into-turbo-with-ruby-on-rails-7
This commit is contained in:
2024-07-28 23:53:35 +02:00
parent 84e6e43812
commit ea5d597fc7
8 changed files with 72 additions and 66 deletions

View File

@@ -0,0 +1,7 @@
<%= turbo_stream.prepend "todos" do %>
<%= render "todo", todo: @todo %>
<% end %>
<%= turbo_stream.replace "#{dom_id(Todo.new)}_form" do %>
<%= render "form", todo: Todo.new %>
<% end %>