Class: Pipeline::GrouperByParent

Inherits:
GrouperForPipeline show all
Defined in:
app/models/pipeline/grouper_by_parent.rb

Overview

Some pipelines group requests together in the inbox, such that all requests in a plate MUST be selected together. This takes the selected checkboxes and splits the information back out to the individual requests.

Instance Method Summary collapse

Methods inherited from GrouperForPipeline

#base_scope, #initialize

Constructor Details

This class inherits a constructor from Pipeline::GrouperForPipeline

Instance Method Details

#all(selected_groups) ⇒ Object



7
8
9
10
# File 'app/models/pipeline/grouper_by_parent.rb', line 7

def all(selected_groups)
  labware_ids = selected_groups.map { |group| extract_conditions(group) }
  base_scope.where('receptacles.labware_id' => labware_ids)
end