method
and!
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
and!(other)public
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 1123
def and!(other) # :nodoc:
incompatible_values = structurally_incompatible_values_for(other)
unless incompatible_values.empty?
raise ArgumentError, "Relation passed to #and must be structurally compatible. Incompatible values: #{incompatible_values}"
end
self.where_clause |= other.where_clause
self.having_clause |= other.having_clause
self.references_values |= other.references_values
self
end