Module: ModelExtensions::Well
- Included in:
- Well
- Defined in:
- app/api/model_extensions/well.rb
Overview
Included in Well The intent of this file was to provide methods specific to the V1 API
Class Method Summary collapse
Instance Method Summary collapse
-
#legacy_asset_type ⇒ Object
Compatibility for v1 API maintains legacy ‘type’ for assets.
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/api/model_extensions/well.rb', line 5 def self.included(base) base.class_eval do scope :for_api_plate_json, -> do preload( :map, :transfer_requests_as_target, # Should be :transfer_requests_as_target # :uuid_object is included elsewhere, and trying to also include it here # actually disrupts the eager loading. plate: :uuid_object, aliquots: Io::Aliquot::PRELOADS ) end end end |
Instance Method Details
#legacy_asset_type ⇒ Object
Compatibility for v1 API maintains legacy ‘type’ for assets
22 23 24 |
# File 'app/api/model_extensions/well.rb', line 22 def legacy_asset_type sti_type end |