diff --git a/admin/config/routes.rb b/admin/config/routes.rb index 0e840e2f796..ae11269286f 100644 --- a/admin/config/routes.rb +++ b/admin/config/routes.rb @@ -2,7 +2,11 @@ SolidusAdmin::Engine.routes.draw do resource :account, only: :show - resources :products, only: [:index, :show, :edit, :update] do + resources( + :products, + only: [:index, :show, :edit, :update], + constraints: ->{ _1.path != "/admin/products/new" }, + ) do collection do delete :destroy put :discontinue