提交 904f1a87 编写于 作者: S Sean Griffin 提交者: GitHub

Merge pull request #29946 from kamipo/passing_arel_to_where_is_boundable

Building `where_clause` in `UniquenessValidator` is no longer needed
......@@ -78,10 +78,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.
先完成此消息的编辑!
想要评论请 注册