method
invert_predicate
rails latest stable - Class:
ActiveRecord::Relation::WhereClause
invert_predicate(node)private
No documentation available.
# File activerecord/lib/active_record/relation/where_clause.rb, line 175
def invert_predicate(node)
case node
when NilClass
raise ArgumentError, "Invalid argument for .where.not(), got nil."
when String
Arel::Nodes::Not.new(Arel::Nodes::SqlLiteral.new(node))
else
node.invert
end
end