Class: PlateBarcode

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
app/models/plate_barcode.rb

Defined Under Namespace

Classes: MockBarcode

Class Method Summary collapse

Class Method Details

.createObject


8
9
10
11
# File 'app/models/plate_barcode.rb', line 8

def self.create
  @barcode ||= Barcode.sanger_code39.where('barcode LIKE "DN%"').order(barcode: :desc).first&.number || 9000000
  MockBarcode.new(@barcode += 1)
end