Fix server-side import_date filtering

This commit is contained in:
Matt-Yorkley
2019-07-25 09:46:08 +01:00
parent 1822fd97a6
commit aeb8d30dae

View File

@@ -103,6 +103,11 @@ module Api
scope.includes(:master)
end
def import_date_scope
return if params[:import_date].blank?
Spree::Variant.where(import_date: params[:import_date])
end
def paged_products_for_producers(producers)
Spree::Product.scoped.
merge(product_scope).