Module: ParamsReady::Query::Predicate::HavingAssociations

Included in:
ExistsPredicate, HavingAttribute
Defined in:
lib/params_ready/query/predicate.rb

Instance Method Summary collapse

Instance Method Details

#dig(record, associations) ⇒ Object



93
94
95
96
97
98
99
# File 'lib/params_ready/query/predicate.rb', line 93

def dig(record, associations)
  associations.reduce(record) do |record, assoc|
    next record if record.nil?

    record.send assoc
  end
end