Module: Aliquot::Aliquotable::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

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


20
21
22
# File 'app/models/aliquot/aliquotable.rb', line 20

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