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.

Defined Under Namespace

Classes: ParentAssociation

Instance Method Summary collapse

Methods included from Asset::Ownership::ChangesOwner

included

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods inherited from ApplicationRecord

alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Instance Method Details

#create_ancestor_asset!(asset, child) ⇒ Object



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

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

#multiple_purposesObject



33
34
35
# File 'app/models/asset_creation.rb', line 33

def multiple_purposes
  false
end