diff options
Diffstat (limited to 'app/queries/searches/product_search.rb')
-rw-r--r-- | app/queries/searches/product_search.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/queries/searches/product_search.rb b/app/queries/searches/product_search.rb new file mode 100644 index 0000000..d426211 --- /dev/null +++ b/app/queries/searches/product_search.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Searches + # ProductSearch + class ProductSearch < BaseSearch + def call + @scope_filter.by_name + .by_company + .by_category + .order_by_available_quantity + .order_by_price + .order_by_bulk_price + .query_result + end + end +end |