Module: WhereExists

Included in:
ActiveRecord::Base
Defined in:
lib/where_exists.rb,
lib/where_exists/version.rb

Constant Summary collapse

VERSION =
"2.0.4"

Instance Method Summary collapse

Instance Method Details

#where_exists(association_name, *where_parameters, &block) ⇒ Object



4
5
6
# File 'lib/where_exists.rb', line 4

def where_exists(association_name, *where_parameters, &block)
  where_exists_or_not_exists(true, association_name, where_parameters, &block)
end

#where_not_exists(association_name, *where_parameters, &block) ⇒ Object



8
9
10
# File 'lib/where_exists.rb', line 8

def where_not_exists(association_name, *where_parameters, &block)
  where_exists_or_not_exists(false, association_name, where_parameters, &block)
end