From 8949f1dc2e0d38792ed91f14f7f90d2031cc7977 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 13 Jul 2023 15:01:00 +1000 Subject: [PATCH] Convert route to resource I don't know why the route helper now has "index" in the name. --- app/views/spree/admin/shared/_product_sub_menu.html.haml | 2 +- config/routes/admin.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/spree/admin/shared/_product_sub_menu.html.haml b/app/views/spree/admin/shared/_product_sub_menu.html.haml index 3013263108..1215f1a02d 100644 --- a/app/views/spree/admin/shared/_product_sub_menu.html.haml +++ b/app/views/spree/admin/shared/_product_sub_menu.html.haml @@ -5,4 +5,4 @@ = tab :variant_overrides, url: main_app.admin_inventory_path, match_path: '/inventory' = tab :import, url: main_app.admin_product_import_path, match_path: '/product_import' - if feature?(:admin_style_v3, spree_current_user) - = tab :products_v3, url: main_app.admin_products_v3_path + = tab :products_v3, url: main_app.admin_products_v3_index_path diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 3f2259c35a..dea9207fb2 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -70,7 +70,7 @@ Openfoodnetwork::Application.routes.draw do post '/product_import/reset_absent', to: 'product_import#reset_absent_products', as: 'product_import_reset_async' constraints FeatureToggleConstraint.new(:admin_style_v3) do - get '/products_v3', to: 'products_v3#index' + resources :products_v3, only: :index end resources :variant_overrides do