Module: Aliquot::Aliquotable::ClassMethods

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

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Instance Method Details

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


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

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