diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/validations/uniqueness.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 4f5b157af9..17662592ad 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -79,10 +79,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) |