Module: Aliquot::Aliquotable::ClassMethods

Defined in:
app/models/aliquot/aliquotable.rb

Instance Method Summary collapse

Instance Method Details

#receptacle_alias(name, options = {}) ⇒ Object



25
26
27
# File 'app/models/aliquot/aliquotable.rb', line 25

def receptacle_alias(name, options = {}, &)
  has_many(name, -> { distinct }, options.merge(through: :aliquots, source: :receptacle), &)
end