Class: MassSearch::ProductCatalogAssignToStoresWorker

Inherits:
Object
  • Object
show all
Includes:
MassSearchWorker
Defined in:
app/workers/mass_search/product_catalog_assign_to_stores_worker.rb

Overview

Maps each selected CatalogItem to a list of stores.
action_params: { store_ids: [] }

Instance Method Summary collapse

Instance Method Details

#build_enumerator(args, cursor:) ⇒ Object



8
9
10
11
12
# File 'app/workers/mass_search/product_catalog_assign_to_stores_worker.rb', line 8

def build_enumerator(args, cursor:)
  super
  @store_ids = (@action_params[:store_ids].presence || []).map(&:presence).map(&:to_i).compact.uniq
  active_record_records_enumerator(@search.search_results, cursor: cursor)
end