From 8da3e77cb6aff36e25085da5f2096ba020360280 Mon Sep 17 00:00:00 2001 From: pjurewicz Date: Tue, 30 Apr 2024 15:33:19 +0200 Subject: [PATCH] make Availability::Product a private constant --- rails_application/app/read_models/availability/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rails_application/app/read_models/availability/configuration.rb b/rails_application/app/read_models/availability/configuration.rb index bb223126..44370c3d 100644 --- a/rails_application/app/read_models/availability/configuration.rb +++ b/rails_application/app/read_models/availability/configuration.rb @@ -3,7 +3,7 @@ class Product < ApplicationRecord self.table_name = "availability_products" end - # private_constant :Product + private_constant :Product def self.approximately_available?(product_id, desired_quantity) !Product.exists?(["uid = ? and available < ?", product_id, desired_quantity])