Class: Pipeline::GrouperBySubmission

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

Overview

Some pipelines group requests together in the inbox, such that all requests in a submission 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_submission.rb', line 7

def all(selected_groups)
  submission_ids = selected_groups.map { |group| extract_conditions(group) }
  base_scope.where(submission_id: submission_ids)
end