Class: Workarea::Catalog::DetailsQueries
- Inherits:
-
Object
- Object
- Workarea::Catalog::DetailsQueries
- Defined in:
- app/models/workarea/catalog/details_queries.rb
Class Method Summary collapse
-
.find_details(name, query) ⇒ Array<String>
Find distinct detail values for the given field name that match the given search string.
-
.find_filters(name, query) ⇒ Array<String>
Find distinct filter values for the given field name that match the given search string.
-
.find_image_options(query) ⇒ Array<String>
Find distinct image option values that match the given search string.
-
.find_sku_details(name, query) ⇒ Array<String>
Find distinct variant detail values for the given field name that match the given search string.
Class Method Details
.find_details(name, query) ⇒ Array<String>
Find distinct detail values for the given field name that match the given search string.
11 12 13 |
# File 'app/models/workarea/catalog/details_queries.rb', line 11 def self.find_details(name, query) find_distinct("details.#{I18n.locale}.#{name}", query) end |
.find_filters(name, query) ⇒ Array<String>
Find distinct filter values for the given field name that match the given search string.
22 23 24 |
# File 'app/models/workarea/catalog/details_queries.rb', line 22 def self.find_filters(name, query) find_distinct("filters.#{I18n.locale}.#{name}", query) end |
.find_image_options(query) ⇒ Array<String>
Find distinct image option values that match the given search string.
44 45 46 |
# File 'app/models/workarea/catalog/details_queries.rb', line 44 def self.(query) find_distinct('images.option', query) end |
.find_sku_details(name, query) ⇒ Array<String>
Find distinct variant detail values for the given field name that match the given search string.
33 34 35 |
# File 'app/models/workarea/catalog/details_queries.rb', line 33 def self.find_sku_details(name, query) find_distinct("variants.details.#{I18n.locale}.#{name}", query) end |