1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #29946 from kamipo/passing_arel_to_where_is_boundable

Building `where_clause` in `UniquenessValidator` is no longer needed
This commit is contained in:
Sean Griffin 2017-07-28 12:42:23 -04:00 committed by GitHub
commit 904f1a8747

View file

@ -78,10 +78,7 @@ module ActiveRecord
else
klass.connection.case_sensitive_comparison(table, attribute, column, value)
end
klass.unscoped.tap do |scope|
parts = [comparison]
scope.where_clause += Relation::WhereClause.new(parts)
end
klass.unscoped.where!(comparison)
end
def scope_relation(record, relation)