From a2255e62d42690fcf5a3562402c11a8fccf19e27 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 17 Apr 2024 17:30:03 +1000 Subject: [PATCH] Revert "Use POST for action that creates data," I'm not happy about it, but we need it to be a standard link to make it work. I assume it's because BulkFormController.preventLeavingChangedForm() isn't smart enough. This reverts commit 91f0a801897a8f8eaa6de7f787cbae258965995b. --- app/views/admin/products_v3/_product_row.html.haml | 2 +- config/routes/spree.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/products_v3/_product_row.html.haml b/app/views/admin/products_v3/_product_row.html.haml index ed1063bc3a..5e11301a5e 100644 --- a/app/views/admin/products_v3/_product_row.html.haml +++ b/app/views/admin/products_v3/_product_row.html.haml @@ -37,7 +37,7 @@ %td.align-right = render(VerticalEllipsisMenu::Component.new) do = link_to t('admin.products_page.actions.edit'), edit_admin_product_path(product), 'data-turbo': false - = link_to t('admin.products_page.actions.clone'), clone_admin_product_path(product), method: :post, 'data-turbo': false + = link_to t('admin.products_page.actions.clone'), clone_admin_product_path(product), 'data-turbo': false %a{ "data-controller": "modal-link", "data-action": "click->modal-link#setModalDataSetOnConfirm click->modal-link#open", "data-modal-link-target-value": "product-delete-modal", "class": "delete", "data-modal-link-modal-dataset-value": {'data-current-id': product.id}.to_json } diff --git a/config/routes/spree.rb b/config/routes/spree.rb index d7c4aa6473..f59e4e7dca 100644 --- a/config/routes/spree.rb +++ b/config/routes/spree.rb @@ -59,7 +59,7 @@ Spree::Core::Engine.routes.draw do resources :products, except: :index do member do - post :clone + get :clone get :group_buy_options get :seo end