Add comments on scoping ProductsRenderer results

This commit is contained in:
Matt-Yorkley
2019-10-07 14:17:23 +01:00
parent bf8c632fce
commit 6433d69d02

View File

@@ -34,7 +34,8 @@ class ProductsRenderer
@products ||= begin
results = distributed_products.products_relation.order(taxon_order)
filter_and_paginate(results).each { |product| product_scoper.scope(product) }
filter_and_paginate(results).
each { |product| product_scoper.scope(product) } # Scope results with variant_overrides
end
end
@@ -76,7 +77,7 @@ class ProductsRenderer
distributed_products.variants_relation.
includes(:default_price, :stock_locations, :product).
where(product_id: products).
each { |v| scoper.scope(v) }
each { |v| scoper.scope(v) } # Scope results with variant_overrides
end
end