Module: PDC::Resource::Query

Extended by:
ActiveSupport::Concern
Included in:
Relation
Defined in:
lib/pdc/resource/relation/query.rb

Instance Method Summary collapse

Instance Method Details

#where(conditions) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/pdc/resource/relation/query.rb', line 5

def where(conditions)
  return self if conditions.empty?

  relation = clone
  relation.params = params.merge(conditions)
  relation
end