Module: Transfer::ControlledDestinations

Included in:
BetweenPlateAndTubes, BetweenPlatesBySubmission
Defined in:
app/models/transfer/controlled_destinations.rb

Overview

The transfer from the source is controlled by some mechanism other than user choice. Essentially an algorithmic transfer, which is recorded so we know what happened.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
# File 'app/models/transfer/controlled_destinations.rb', line 6

def self.included(base)
  base.class_eval do
    # Ensure that the transfers are recorded so we can see what happened.
    serialize :transfers_hash
    alias_attribute :transfers, :transfers_hash
    validates_unassigned :transfers_hash
  end
end