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:
commit
904f1a8747
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue