Class: PlateType

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

Overview

rubocop:todo Style/Documentation

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 Squishify

extended

Class Method Details

.cherrypickable_default_typeObject


12
13
14
# File 'app/models/plate_type.rb', line 12

def cherrypickable_default_type
  Sequencescape::Application.config.cherrypickable_default_type
end

.names_and_maximum_volumesObject


16
17
18
# File 'app/models/plate_type.rb', line 16

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

.plate_default_typeObject


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

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