From 3d5754d832771aff47ba19bcc3333906fc353fdb Mon Sep 17 00:00:00 2001 From: climbus Date: Wed, 23 Feb 2022 21:29:08 +0100 Subject: [PATCH] fix exception: uninitialized constant When posted wrong vat code: NameError (uninitialized constant Invoicing::Product::VatRateNotApplicable) But still not working because of https://github.com/RailsEventStore/ecommerce/blob/master/rails_application/app/controllers/products_controller.rb#L45 and exception: [Infra::Types::VatRate.new] :code is missing in Hash input ;) --- rails_application/app/controllers/products_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rails_application/app/controllers/products_controller.rb b/rails_application/app/controllers/products_controller.rb index 059ce8e1d..33f4c81e6 100644 --- a/rails_application/app/controllers/products_controller.rb +++ b/rails_application/app/controllers/products_controller.rb @@ -23,7 +23,7 @@ def create rescue ProductCatalog::AlreadyRegistered flash[:notice] = "Product was already registered" render "new" - rescue Invoicing::Product::VatRateNotApplicable + rescue Taxes::Product::VatRateNotApplicable flash[:notice] = "Selected VAT rate not applicable" render "new" else