Module: ModelExtensions::Submission

Included in:
Submission
Defined in:
app/api/model_extensions/submission.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'app/api/model_extensions/submission.rb', line 2

def self.included(base)
  base.class_eval do
    scope :include_orders, -> { includes(orders: { study: :uuid_object, project: :uuid_object, assets: [:uuid_object, aliquots: Io::Aliquot::PRELOADS] }) }

    def order
      orders.first
    end
  end
end