Class: MassSearch::ItemAddToNextCycleCountWorker

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

Overview

Flags StoreItems for the next cycle count for each selected Item.
action_params: { target_store_id: } — "both" means store IDs [1, 2]

Instance Method Summary collapse

Instance Method Details

#build_enumerator(args, cursor:) ⇒ Object



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

def build_enumerator(args, cursor:)
  super
  raw = @action_params[:target_store_id]
  @store_ids = raw == 'both' ? [1, 2] : [raw.to_i]
  active_record_records_enumerator(@search.search_results, cursor: cursor)
end