Class: Torque::PostgreSQL::Associations::AssociationScope::PredicateBuilderArray

Inherits:
Object
  • Object
show all
Includes:
PredicateBuilder::ArrayHandler
Defined in:
lib/torque/postgresql/associations/association_scope.rb

Overview

A customized predicate builder for array attributes that can be used standalone and changes the behavior of the blank state

Instance Method Summary collapse

Methods included from PredicateBuilder::ArrayHandler

#call, #call_for_array

Instance Method Details

#call_with_empty(attribute) ⇒ Object



12
13
14
# File 'lib/torque/postgresql/associations/association_scope.rb', line 12

def call_with_empty(attribute)
  '1=0' # Does not match records with empty arrays
end