From d5877b5e5cf7523482b2e480f94ac28379d0aa31 Mon Sep 17 00:00:00 2001 From: lukaszreszke Date: Mon, 23 Sep 2024 18:11:55 +0200 Subject: [PATCH] mhm --- 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 369d9baf..eb5bfb40 100644 --- a/rails_application/app/controllers/products_controller.rb +++ b/rails_application/app/controllers/products_controller.rb @@ -28,7 +28,7 @@ def update @product.future_price_start_time = params["future_price"]["start_time"] @product.save! else - ActiveRecord::Base.transaction do + ApplicationRecord::Base.transaction do @product_with_new_price = @product.dup @product_with_new_price.price = product_params[:price] @product_with_new_price.latest = true