提交 23b53294 编写于 作者: R Ryuta Kamizono

Building `where_clause` in `UniquenessValidator` is no longer needed

Building `where_clause` manually was introduced at #26073 to include
both `comparison` and `binds` in `where_clause`. Since 213796fb,
`comparison` includes `binds`, so it is enough to use `where` simply.
上级 eb080d91
......@@ -79,10 +79,7 @@ def build_relation(klass, attribute, value)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册