Module: ModelExtensions::Plate::NamedScopeHelpers

Included in:
AssetCreation, Transfer::BetweenPlates, Transfer::BetweenPlatesBySubmission
Defined in:
app/api/model_extensions/plate.rb

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Instance Method Details

#include_plate_named_scope(plate_association) ⇒ Object


5
6
7
8
9
# File 'app/api/model_extensions/plate.rb', line 5

def include_plate_named_scope(plate_association)
  scope :"include_#{plate_association}", lambda {
                                           includes(plate_association.to_sym => ::ModelExtensions::Plate::PLATE_INCLUDES)
                                         }
end