Class: PlateType

Inherits:
ApplicationRecord show all
Defined in:
app/models/plate_type.rb

Class Method Summary collapse

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Class Method Details

.cherrypickable_default_typeObject


10
11
12
# File 'app/models/plate_type.rb', line 10

def cherrypickable_default_type
  Sequencescape::Application.config.cherrypickable_default_type
end

.names_and_maximum_volumesObject


14
15
16
# File 'app/models/plate_type.rb', line 14

def names_and_maximum_volumes
  PlateType.all.map { |pt| "#{pt.name}: #{pt.maximum_volume}" }.join(', ')
end

.plate_default_typeObject


5
6
7
8
# File 'app/models/plate_type.rb', line 5

def plate_default_type
  create_with(maximum_volume: Sequencescape::Application.config.plate_default_max_volume)
    .find_or_create_by!(name: Sequencescape::Application.config.plate_default_type)
end