Class: Item::Materials::CompatibleMembranes
- Inherits:
-
BaseCompatibleFinder
- Object
- BaseCompatibleFinder
- Item::Materials::CompatibleMembranes
- Defined in:
- app/services/item/materials/compatible_membranes.rb
Overview
This class is responsible for finding a catalog item's compatible controls
Instance Method Summary collapse
-
#process(item:, catalog_items_scope: nil) ⇒ Object
At a minimum you need an item If you provide a catalog item scope, such as Catalog.catalog_items.for_online_catalog It will be used to populate the catalog_items results Without a catalog item scope only the items will be populated in the result.
Instance Method Details
#process(item:, catalog_items_scope: nil) ⇒ Object
At a minimum you need an item
If you provide a catalog item scope, such as Catalog.catalog_items.for_online_catalog
It will be used to populate the catalog_items results
Without a catalog item scope only the items will be populated in the result
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/services/item/materials/compatible_membranes.rb', line 8 def process(item:, catalog_items_scope: nil) items = Item.none = [] if item.is_tz_cable? items = Item.active.by_product_line_path(LtreePaths::PL_FLOOR_HEATING_UNDERLAYMENT_PRODESO) .by_product_category_path(LtreePaths::PC_ACCESSORIES_MEMBRANES) end return_results(item: item, items: items, catalog_items_scope: catalog_items_scope) end |