From a1f1f2b728792e182ae8504b101927e565f5c9ca Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 12 Feb 2025 14:59:19 +0800 Subject: [PATCH] fix: add turbo_frame data attribute to buttons - Update buttons to include data attribute for Turbo frames - Ensure proper behavior of navigation with turbo-enabled requests This change enhances the functionality of the buttons by allowing them to interact with Turbo frames, improving performance and user experience when transitioning between different views on the application. --- app/views/cities/_city.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/cities/_city.html.erb b/app/views/cities/_city.html.erb index 98e6a00..bf0ba53 100644 --- a/app/views/cities/_city.html.erb +++ b/app/views/cities/_city.html.erb @@ -74,7 +74,7 @@
<%= link_to city_path(city), - class: "btn btn-primary btn-sm gap-2" do %> + class: "btn btn-primary btn-sm gap-2", data: { turbo_frame: "_top" } do %> View Details @@ -114,7 +114,7 @@
<%= link_to city_path(city), - class: "btn btn-primary btn-sm gap-2" do %> + class: "btn btn-primary btn-sm gap-2", data: { turbo_frame: "_top" } do %> View Details