Class: AssetCreation
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- AssetCreation
- 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.
Direct Known Subclasses
PlateCreation, PooledPlateCreation, TubeCreation, TubeFromTubeCreation
Defined Under Namespace
Classes: ParentAssociation
Instance Method Summary collapse
Methods included from Asset::Ownership::ChangesOwner
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
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_purposes ⇒ Object
33 34 35 |
# File 'app/models/asset_creation.rb', line 33 def multiple_purposes false end |