Class: AssetCreation

Inherits:
ApplicationRecord show all
Extended by:
ModelExtensions::Plate::NamedScopeHelpers
Includes:
Asset::Ownership::ChangesOwner, Uuid::Uuidable
Defined in:
app/models/asset_creation.rb

Overview

Factory class primarily used by the API to generate new pieces of labware. In addition provides an audit trail to record who created the Asset.

Instance Method Summary collapse

Methods included from Asset::Ownership::ChangesOwner

included

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

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

Instance Method Details

#create_ancestor_asset!(asset, child) ⇒ Object


28
29
30
# File 'app/models/asset_creation.rb', line 28

def create_ancestor_asset!(asset, child)
  AssetLink.create_edge!(asset, child)
end

#multiple_purposesObject


37
38
39
# File 'app/models/asset_creation.rb', line 37

def multiple_purposes
  false
end