Module: Pipeline::InboxGroupedBySubmission

Included in:
GenotypingPipeline, PacBioSequencingPipeline
Defined in:
app/models/pipeline/inbox_grouped_by_submission.rb

Overview

A pipeline that has its inbox grouped by submission needs to provide specific paging capabilities. All requests for a submission must appear on the same page, i.e. if a submission has 200 requests and there are only 100 allowed per page, then all of these requests must appear on a page and not across two.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


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

def self.included(base)
  base.has_many :inbox, class_name: 'Request', extend: [Pipeline::RequestsInStorage]
  base.group_by_submission = true
  base.request_sort_order = { submission_id: :desc, id: :asc }.freeze
end