Module: ModelExtensions::Plate::NamedScopeHelpers

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

Instance Method Summary collapse

Instance Method Details

#include_plate_named_scope(plate_association) ⇒ Object


3
4
5
# File 'app/api/model_extensions/plate.rb', line 3

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