From 249addc8ddaf51e9cd44bfef45681a21204192fa Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 12 Sep 2025 13:52:35 +0200 Subject: [PATCH 1/2] Fix: all collections link not working after moving to turbo frame This is turbo handling the GET form under the hood ignoring the script name --- app/views/filters/menu/collections/_all_option.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/filters/menu/collections/_all_option.html.erb b/app/views/filters/menu/collections/_all_option.html.erb index d5b5ade05..3105f814d 100644 --- a/app/views/filters/menu/collections/_all_option.html.erb +++ b/app/views/filters/menu/collections/_all_option.html.erb @@ -1,4 +1,4 @@ -<% clear_url_path = user_filtering.self_filter_path(user_filtering.as_params.except(:collection_ids)) %> +<% clear_url_path = user_filtering.self_filter_path(user_filtering.as_params.except(:collection_ids), script_name: request.script_name) %> <% if Current.user.collections.many? %> - <% end %> - <% end %> -<% end %> diff --git a/app/views/cards/show/_collections.html.erb b/app/views/cards/show/_collections.html.erb deleted file mode 100644 index 41aba2c1c..000000000 --- a/app/views/cards/show/_collections.html.erb +++ /dev/null @@ -1,51 +0,0 @@ - -<%= form_with url: cards_path, method: :get, class: "display-contents", - data: { controller: "form" } do |form| %> - <% if Current.user.collections.one? %> - <%= link_to cards_path, class: "popup__group", data: { filter_target: "item", navigable_list_target: "item" } do %> - <%= tag.div class: "popup__item btn" do %> - <%= Current.user.collections.first.name %> - GO TO - <% end %> - <% end %> - <% elsif Current.user.collections.many? %> -
  • - <%= link_to cards_path, class: "popup__group", data: { filter_target: "item", navigable_list_target: "item" } do %> - - <%= tag.div class: "popup__item btn" do %> - All collections - GO TO - <% end %> - <% end %> -
  • - - <% Current.user.collections.ordered_by_recently_accessed.each do |collection| %> - - <% end %> - <% end %> -<% end %>