Module: Workarea::Search::Storefront::Product::Facets::ClassMethods
- Defined in:
- app/models/workarea/search/storefront/product/facets.rb
Instance Method Summary collapse
-
#current_product_rule_fields ⇒ Hash
A hash representing current fields available for product rules.
-
#current_terms_facets ⇒ Array<String>
The current facets to use when searching for products.
Instance Method Details
#current_product_rule_fields ⇒ Hash
A hash representing current fields available for product rules. Keys are the displayable name, values are the fields as mapped in the search index.
15 16 17 18 19 20 21 22 |
# File 'app/models/workarea/search/storefront/product/facets.rb', line 15 def current_product_rule_fields Workarea.config.product_rule_fields.merge( Workarea::Search::Settings.current.terms_facets.reduce({}) do |memo, facet| memo[facet] = "facets.#{facet.systemize}" memo end ) end |