From 1127262a610486ff54596967e6707a78e944b502 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 31 Oct 2012 00:37:13 -0200 Subject: Change relation in place --- activerecord/lib/active_record/validations/uniqueness.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 5700350cf9..2a4a70cd59 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -33,7 +33,7 @@ module ActiveRecord end relation = finder_class.unscoped.where(relation) - relation = relation.merge(options[:conditions]) if options[:conditions] + relation.merge!(options[:conditions]) if options[:conditions] if relation.exists? error_options = options.except(:case_sensitive, :scope, :conditions) -- cgit v1.2.3